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 10:59:54
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00032163
Message ID:
00032188
Views:
34
>>I have a custom class that needs to trap some input from a form dialog. The custom object creates the form object and displays it via oform.Show(). The form has typical OK and Cancel buttons but when trying to set a property in the custom class, I cannot seem to get the form to reference the custom object. I've worked much with passing a reference of the custom class to the dialog form and although TYPE() returns an "O", I continually get an error message about WITH/ENDWITH. The custom class gets added to a container which has other controls on it and is added to a form. This custom class should be able to be put in any for or container so a generic reference to it needs to be recognized by the dialog form.
>>
>>What am I missing here.
>>
>>Steve Despres
>>EZ Data Inc.
>
>In custom class:
>
>THIS.oForm = CREATEOBJECT("theForm", THIS)
>THIS.oForm.Show()
>
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform