General information
Category:
Object Oriented Programming
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only