Page 1 of 1

LockPS

Posted: Fri May 25, 2012 12:48 am
by c-tec
Hello,
I have sometimes a problem when leaving a dialog. I write messages in a text static in this dialog. When I close the dialog this object should not be available anymore, I check this in my function for setting the caption. But it seems that the object is still available, but has a wrong status for setting the caption.
I get the the attached message when closing the dialog.

this is my code for setting the caption:

Code: Select all

if upper(VALTYPE(oMSGSAY2)) = "O"
        oMSGSAY2:setcaption(XTOC(cMsg))
how can I check the status of the object for changing the caption ?

regards
Rudolf

Re: LockPS

Posted: Fri May 25, 2012 7:58 am
by rdonnay
IF oButton:status() > 0
.. set the caption
ENDIF

Re: LockPS

Posted: Sat May 26, 2012 12:26 am
by c-tec
Hello Roger
thank you !
regards
Rudolf