Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_assign and return
Message
From
11/11/2003 22:16:50
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
_assign and return
Miscellaneous
Thread ID:
00848959
Message ID:
00848959
Views:
44
Hi Everybody

I want to exit from method of a class once a property has something inside by using _assign method.What is the practice from getting out of current method and return the error message ?

Any help is highly appreciated. Thanks

MM = CREATEOBJECT("CAR_PARK")
? MM.TEST_DRIVE()
Sorry.Full ! <---- Returned message

DEFINE CLASS CAR_PARK AS SESSION OLEPUBLIC
ERROR_MESSAGE = ""

PROCEDURE ERROR_MESSAGE_ASSIGN
LPARAMETERS vNewVal
THIS.ERROR_MESSAGE = m.vNewVal
IF .NOT.EMPTY(THIS.ERROR_MESSAGE)
RETURN THIS.ERROR_MESSAGE TO MASTER <- ???????????? Pls enlighting me
ENDIF
ENDPROC

PROCEDURE TEST_DRIVE
THIS.ERROR_MESSAGE = "Sorry.Full !"

Execution terminated
Blah...Blah...Blah...
ENDPROC
ENDDEFINE
Next
Reply
Map
View

Click here to load this message in the networking platform