Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Subclass problem w/ classic VBScript on IIS 5

Reply
Thread Tools

Subclass problem w/ classic VBScript on IIS 5

 
 
MyndPhlyp
Guest
Posts: n/a
 
      10-24-2005
I am working with Classes in classic VBScript on IIS 5.0 and am having a
problem wrapping my head around a solution.

I have a Class defining a record layout. (Bear with me here as I completely
roach the OOP language.) The objects are columns of the record and each
column is defined as its own Class.

The record layout class has a method called Column(str) that returns the
subclass's object. The subclass, in turn, has a Property Get (and a
corresponding Property Set) called Value. This allows me to make a
references like:

strField = objRecord.Column("mycolumn").Value

objRecord.Column("mycolumn").Value = strField


All that works fine and dandy.


The problem is getting a default behavior. I want to make the reference:

strField = objRecord.Column("mycolumn")

and retrieve Value from the subclass. What I get from IIS is "Object doesn't
support this property or method". I would expect that statement to trigger
the Property Get for the subclass.


Any ideas? Or am I just expecting too much from classic VBScript?


 
Reply With Quote
 
 
 
 
MyndPhlyp
Guest
Posts: n/a
 
      10-24-2005

"Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
news:(E-Mail Removed) ...
> > The record layout class has a method called Column(str) that returns the
> > subclass's object.

>
> > strField = objRecord.Column("mycolumn")

>
> If the method called Column is returning an object, then shouldn't you be
> coding it like this:
>
> set strField = objRecord.Column("mycolumn")


If I wanted to return the field as an object, yes. But I want only the Value
property and not the whole object. Since the statement I used as an example
is an assignment to a variable, and since objRecord.Column("mycolumn") is
the object that contains the Value, I want the default action of the
assignment's object to be Property Get Value rather than having to append
the Value property to each statement.


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      10-25-2005
According to
http://msdn.microsoft.com/library/de...ropertyGet.asp
you should be able to use the "Default" keyword to indicate that Value is
the default property for this class...

--
Patrice

"MyndPhlyp" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
>
> "Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
> news:(E-Mail Removed) ...
> > > The record layout class has a method called Column(str) that returns

the
> > > subclass's object.

> >
> > > strField = objRecord.Column("mycolumn")

> >
> > If the method called Column is returning an object, then shouldn't you

be
> > coding it like this:
> >
> > set strField = objRecord.Column("mycolumn")

>
> If I wanted to return the field as an object, yes. But I want only the

Value
> property and not the whole object. Since the statement I used as an

example
> is an assignment to a variable, and since objRecord.Column("mycolumn") is
> the object that contains the Value, I want the default action of the
> assignment's object to be Property Get Value rather than having to append
> the Value property to each statement.
>
>



 
Reply With Quote
 
MyndPhlyp
Guest
Posts: n/a
 
      10-25-2005

"Patrice" <(E-Mail Removed)> wrote in message
news:%23ZSr$(E-Mail Removed)...
> According to
>

http://msdn.microsoft.com/library/de...ropertyGet.asp
> you should be able to use the "Default" keyword to indicate that Value is
> the default property for this class...


Cool. That is exactly what I was looking for. Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subclass of subclass Fab C++ 0 08-09-2012 09:54 AM
subclass a class in the namespace of the that subclass Trans Ruby 8 10-23-2008 07:24 AM
String subclass method returns subclass - bug or feature? S.Volkov Ruby 2 03-12-2006 06:46 PM
subclass has a variable that is subclass of same superclass jstorta Java 3 02-20-2006 08:42 PM
Server-side includes (IIS 5, classic VBScript) MyndPhlyp ASP General 7 10-27-2005 02:28 AM



Advertisments