- Haakon Langballe
- PowerBuilder
- Wednesday, 20 November 2019 10:32 AM UTC
Hi!
Our application crashes when CloseWithReturn is called in the window open() event handler. The error occurs when returning early from the Open() handler when incorrect parameters are passed.
My code:
...
integer retval = CloseWithReturn(this, 0)
---
retval is -1, indicating some error. The window is not closed so the code execution continues. Apparently the window object is destroyed(partly?) and inevitably the application crashes. I suspect maybe other messages are trying to reach the Open() event for handling but haven't found out how to solve that eventuality
- Is it legal (or recommended) to do CloseWithReturn() in Open()
- What would be a better graceful termination of the window in an error situation?
Cheers
Haakon
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.