Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get returned value from a class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00025913
Message ID:
00025918
Views:
29
>I made a kind of Form class which asks to
>confirm delete or not.
>There are two command buttons,
>-Yes and No, each returns .t. and .f. in the unload event.
>The Class name is YesorNo and I write some code like below,
>
>confirm_box=CreateObject('YesorNo')
>confirm_box.show()
>
>And I lost my way to take the returned value(.t. or .f.) from the Object.

add a property to your class called lReturnValue. in your buttons put the following

-- YES --
thisform.lReturnValue = .t.
thisform.hide

-- NO --
thisform.lReturnValue = .f.
thisform.hide

in your calling code,

llReturnedValue = confirm_box.lReturnValue
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform