Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exiting class from a method
Message
From
20/07/1997 09:58:39
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00040790
Message ID:
00040796
Views:
29
>>My class's click event is calling one custon method, which is checking the important properties (whethere set properly or not).
>>
>>If any of the 4-5 properties is not set properly then it should exit from class, the problem is if I give a return statement from custom method, it returns control to click method..
>>
>>Any suggestion..
>>
>>Actually, I will prefer to do something like this..
>>
>>If !allok &&calling custom method & returning logical value
>>
>>return
>>endif
>>
>>Thanks in advance..
>Vinod,
>
>Here's one way you can accomlpish your goal. Make the Clcik of the button be responsible for exiting the class, let the other mehtod simply check the conditions and then tell the click what it should do as in;
>
> * Custom ChcekIt method
> IF
> RETURN .T.
> ELSE
> RETURN .F.
> ENDIF
>
>Now your click would;
>
> IF THISFORM.CheckIt()
> * Do one thing
> ELSE
> * Do something else
> ENDIF

Thanks..
This is exactly what I tried first time, but it was not working..

the statement if thisform.checkit() was not working, still I will try, any ideas why it can fail
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform