Invalid widget handle used in WAIT-FOR statement

Posted by Patrick Tingen on 07-Dec-2017 03:32

I might be stupid of haven't had enough coffie yet, but for the life of me I cannot figure out how to fix this. 

Situation:

  1. I have a normal window that calls another one to show some information. 
  2. The second window pops up
  3. User closes first window, second window stays open
  4. User closes second window, error 'Invalid widget...' occurs

In other variants I got the error 'None of the widgets used in the WAIT-FOR statement are in a state (such as SENSITIVE) such that the specified event can occur. WAIT-FOR terminated. (4123)' but I think the cause is the same. 

In a sense I understand why it fails, but in turn I fail to fix it :(

The events that fire is a kind of jungle; close of this-procedure, go of frame, window-close etc. I am kind of lost how I should fix it. 

Attached a very simple test case. Place them in c:\temp and run test_hello.w.

[View:/cfs-file/__key/communityserver-discussions-components-files/19/5670.HelloWorld.zip:320:240]

All Replies

Posted by James Palmer on 07-Dec-2017 03:42

I'm not in a position to test anything at the moment (in a meeting!! Oops!), but id you run test_showfile.w persistent does the same thing happen?

Posted by Stefan Drissen on 07-Dec-2017 04:42

Can you fix the examples? They are now both attempting to run HelloWorld.w while the zip contains:

  • test_hello.w
  • test_showfile.w

Posted by Patrick Tingen on 07-Dec-2017 04:59

Fixed example in the first post

Posted by Patrick Tingen on 07-Dec-2017 05:14

[mention:77cbb45621a246f9a1a1f2f378e535b1:e9ed411860ed4f2ba0265705b8793d05] I owe you a beer; that fixed it. Thanks!

Posted by James Palmer on 07-Dec-2017 08:48

I owe you a beer (for Datadigger), you owe me one for that. I think we're even!! :)

This thread is closed