Hi all,
I just wonder about Access methods for collection objects. I want to be able to access a collection-object determined by an access-method in the same way as I usually do with "static" collections. But it seems as if Object.Collection(1) doesn't work - while Object.Collection.Item(1) does ... This makes working with dynamic collections pretty hard as access-methods are intended to hide this process of choosing the right object.
Anyone an idea how to get around this ?
TIA
Matthias
The code :
o = createobject('Test')
o.Test.Add(CREATEOBJECT('Custom'))
? o.oTest(1) && fails
? o.oTest.Item(1) && ok
DEFINE CLASS test AS Custom
oTest = .NULL.
ADD OBJECT Test AS Test2
PROTECTED PROCEDURE oTest_Access AS Object
this.oTest = this.Test
RETURN this.oTest
ENDPROC
ENDDEFINE
DEFINE CLASS Test2 AS Collection
ENDDEFINE
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only