>>I never have attempted to use the same class
>>in both a form and by hand-coding and I am
>>running into a problem.
>>
>>Assuming the class has a character property
>>called myString:
>>
>>By hand-coding:
>> oXYZ=CreateObject("myclass")
>> and then
>> =oByHand.myMethod()
>>
>>By form:
>> Just drop it on the form
>> and then
>> =thisform.myMethod()
>>
>>
>>BUT BUT BUT
>>
>>PROCEDURE myMethod
>>* by form
>>WAIT WINDOW thisform.myString
>>* |
>>* |<---- CONFLICT !!!
>>* by hand |
>>WAIT WINDOW oByHand.mystring
>>*
>>RETURN
>>
>>How do I resolve this calling conflict?
>> "thisform." versus "oByhand."
>>
>>Thanks
>>Gene
>
>I guess you got into trap: CREATEOBJECT() creates 'independent' object, which has nothing to do with Thisform. But if you would use AddObject, then you add new object to Form Container (exactly as Form Designer does) and everything going right!
If I used CreateObject() I thought within the form I would still have to use
thisform.oXYZ.myMethod
Previous
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