>Hi,
>
>I have a method in the base class (e.g. method name BEFORE_PROCESS) that returns .T. or .F.
>
>I want the child class of this class to have its own code before calling the parent BEFORE_PROCESS. Therefore, the pseudo code in the child method BEFORE_PROCESS is:
>
>
>nChoice = messagebox("question ...")
>if nChoice = 7
> RETURN .F.
>endif
>
>*-- now calling the method of the parent class
>DODEFAULT()
>
>*-- but how to capture the return value in the parent method so that to return from here?
>
>
>
>TIA.
I see Naomi and Viv have answered your question. Just a minor stylistic suggestion -- if you include FOXPRO.H, you can code this
if nChoice = IDNO
instead of this
if nChoice = 7
Maybe it's just personal preference but I think the first way is much more readable than using a magic number. Likewise, I prefer the dialog box options spelled out rather than using numbers.