I have just try the method which you and Mark told me to do. It works.
My Test:
loDemo=CREATEOBJECT("UseArray")
DEFINE CLASS MyCustomObj AS Custom
DIMENSION ArrayProp(1)
ENDDEFINE
DEFINE CLASS UseArray AS MyCustomObj
PROCEDURE Init
DIMENSION This.ArrayProp(2)
This.ArrayProp[1]='Hello'
This.ArrayProp[2]='GoodBye'
ENDPROC
ENDDEFINE
END Test
But, I have another question. How to store "MyCustomObj" into classlib. I have tried 'ADD CLASS' and Class Designer. They can store the class into my classlib. Is there any method can do it?
Thanks David and Mark, your suggestion is great.
Sunny
>Sunny,
>
>To add a little to Mark's reply. Inside the methods of the class you can reference the array using this just like any other property:
>
>Init:
>
dimension this.maTheArray[100]
>for i = 1 to 100
> this.maTheArray[i] = "Item" + str(i)
>endfor
>
>You don't have to dynamically dimension the array, if it's a fixed size you can specify the full dimension when you define the custom property.
>
>>I am trying to store an array to "this" property but I can't successful. Does "this" can do it?
Can you live without the earth?
Please remind that :
"Yung Hung" is my first name;
"Yeung" is my last/family name.