Subclass problem w/ classic VBScript on IIS 5

M

MyndPhlyp

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?
 
M

MyndPhlyp

Brian Staff said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top