Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a form class to recognize who created it.
Message
 
To
14/05/1997 12:07:52
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00032163
Message ID:
00032229
Views:
37
>>>In oForm.Init():
>>>
>>>LPARAMETERS oCallingObj
>>>
>>>THISFORM.oCallingObj = m.oCallingObj
>>>
>>>WITH THISFORM.oCallingObj
>>>.Some_Property = "Set to this"
>>>ENDWITH
>>>
>>>Is this similar to what you are doing and it doesn't work?
>>>
>>>-Doug-
>>
>>Yes,
>>
>>Custom Class.Init
>>
>>THIS.AddObject("oForm", "form def")
>>THIS.glOK = .F. (The property I want the form to set)
>>
>>CustomClass.ShowForm() && Custom method
>>
>>Loads a listbox for the form
>>THIS.oForm.Show()
>>
>>****************
>>
>>So now the form is showing and I want to have the OK or Cancel buttons set the CustomClass.glOK property. But no matter what I've tried, the form does not recognize the Custom Class.
>>
>>Thanks,
>>Steve
>
>Ahhh...maybe using AddObject is causing the problem?? Try something similar to the example I gave using CreateObject instead. I haven't tried adding a Form as a *member* of another Form and thinking about it doesn't sound kosher.
>
You can't add a form as a member of a form. You get an error message, but CustomClass is just that...simply a class based on VFP's "custom" base class. But I'll try it as a variable as you suggested.

Thanks,
Steve
>-Doug-
Previous
Reply
Map
View

Click here to load this message in the networking platform