Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return from class not working
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01450967
Message ID:
01450979
Views:
77
This message has been marked as the solution to the initial question of the thread.
Chuck,

The Attended form class should have a property to hold your return value. Alternative solution would be passing a parameter object to the form and setting properties of this object.

There are other ways of solving this problem, but IMHO saving a property in a form, then hiding the form, grabbing the property's value and releasing the form is one of the most commonly used techniques.

>Naomi,
>Which form are referring to to save the value in? Here is the code from the calling form:
>
>LOCAL llUpdate
>llUPdate = .F.
>
>IF VARTYPE(oAttended) != 'O'
>	PUBLIC oAttend
>	oAttend = NEWOBJECT('attended','attended',oAppVars.psExeName)
>ENDIF 
>llUpdate = oAttend.show(1,psDbf,psClass,psCity,psBldg,psRoom,psMo,psDay,psYr,psTime)
>RETURN llUpdate && always returns true
>
>
>>>I cannot get a correct boolean return value from a form class, it is always true. This is the code:
>>>
>>>oAttend unload event = return Thisform.plUpdated
>>>
>>>llUpdated = oAttend.show(1,psDbf,psClass,psCity,psBldg,psRoom,psMo,psDay,psYr,psTime)
>>>
>>>The value is False in the unload of the form class but changes to True when returned to the calling form class. Yes, the window type is modal. Any ideas?
>>>
>>>Thanks, Chuck
>>
>>
>>The only way to get the value using class is to save the value in form's property, in the close button, hide the form, in your code grab the value and then release the form.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform