Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 8 Jahren, 3 Monaten
Letzter Beitrag:
vor 8 Jahren, 3 Monaten
Beteiligte Autoren:
DerekT, Al, Jimbo

MyWindow

Startbeitrag von DerekT am 08.06.2009 08:57

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

Antworten:

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


von Jimbo - am 08.06.2009 14:22
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

von Al - am 08.06.2009 15:04
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

von DerekT - am 09.06.2009 09:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.