Welcome! Log In Create A New Profile

Advanced

MyWindow

Posted by DerekT 
DerekT
MyWindow
June 08, 2009 10:57AM
WDMobile 12

Mobile application - 1 window, 9 planes

If Logon fails then the app will change plane and go into a retry loop.
This runs for 5 iterations in its own thread - global procedure programmed using the automatic timer (icon top right of code window).
If Logon cannot be achieved then I return, or at least should do, to the Logon window.

The code used to do this is MyWindow..plane = 1
What I get is the following error.............
Error at line 36 of Local Procedure lpP01b_LogonLoop process.
Unable to use MyWindow: no current window.


Why,how can I lose reference to the current window when there is only one?

Changing the command to use the actual window name overcomes the problem but I would be interested for any insight into this situation.
MyWindow..plane = n works everywhere else without a problem.

Regards

DerekT
Jimbo
Re: MyWindow
June 08, 2009 04:22PM
Quote
DerekT
WDMobile 12

Mobile application - 1 window, 9 planes

If Logon fails then the app will change plane and go into a retry loop.
This runs for 5 iterations in its own thread - global procedure programmed using the automatic timer (icon top right of code window).
If Logon cannot be achieved then I return, or at least should do, to the Logon window.

The code used to do this is MyWindow..plane = 1
What I get is the following error.............
Error at line 36 of Local Procedure lpP01b_LogonLoop process.
Unable to use MyWindow: no current window.


Why,how can I lose reference to the current window when there is only one?

Changing the command to use the actual window name overcomes the problem but I would be interested for any insight into this situation.
MyWindow..plane = n works everywhere else without a problem.

Regards

DerekT

Hi Derek, the error message tells it all: the window is gone or not yet here (presumably closed behind your back or not not yet open, means that you were still in project code).
Kind regards, Guenter
Al
Re: MyWindow
June 08, 2009 05:04PM
Hello Derek

Is it the fact that you are running the second process in a thread.
The help says that "The Hyper File context evolves independently in each thread. " so maybe the MyWindow() values are cleared for each thread and start in a new context also.

Regards
Al
DerekT
Re: MyWindow
June 09, 2009 11:47AM
Gentlemen

Thanks for your thoughts

Jimbo....
There is only one window - seems that I can see it but the underlying programming cannot so therefore your 'window is closed' is somehow correct.
Pretty much smoke and mirrors stuff!!!

Al....
Thought you might be 'on the money' with this one but looking at the Automatic Procedure window I see that the option Without Hyper File (without context copy) is selected.
Also at this stage I am not accessing Hyperfile - this is purely SOAP/WebService stuff.

I do use a number of Threads in the app but this is the only one that attempts to return control to the app on completion.

The solution has been to go through the code and replace all references to the Myxxxx operators with the full window/control name.

Regards

DerekT
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: