View previous topic :: View next topic |
Author |
Message |
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Sun Jun 12, 2005 6:14 am Post subject: Window Problem - execution does not halt after %aw |
|
|
Hi, if you are still patient enough to help me....
here is just another one that beats me.
What I want:
(1) a big frame covering all the screen, giving the program's name in the caption
(2) small window to give options to the user.
My solution:
(1) iwin=winio@('%ww[maximise]&')
(2) iwin=winio@('%fr&',800,600)
(3) iwin=winio@('%ca[MapMaker 3.01]&')
(4) iwin=winio@('%lw',kcm)
...
...
(5) iwin=winio@('%ww[toolwindow]&')
(6) iwin=winio@('%aw&',kcm)
(7) iwin=winio@('%ca[Select Project]%sp&',260,150)
( iwin=winio@('%cnWhich Project do you select ?&')
(9) iwin=winio@('%2nl%cn%20.3ls&',dir,ndir,iselect)
(10) iwin=winio@('%2nl%cn%^tt[abort]&',irgpn1)
(11) iwin=winio@('%ta%`^tt[okay]',irgpn2)
lines 1 to 4 define the big bachground window covering all the screen
5 to 11 define a window with a menue to give all the projects available. The project is selected by clicking on it and then press 'okay' or 'abort' to stop execution.
irgpn1 and irgpn2 are call back functions making the user's selection available to the prog and return -1 to winio@ in order to close the small selection window.
Trouble is line 6.
If I do not have it to the code, the window behaves as I want it to do, meaning after displaying it execution terminates until the user either clicks on 'okay' or 'abort'. But if by mistake the user clicks utside of it, the background window gets control and supercedes the selection window.
However if I add line 6 as done here, execution of the program does not stop after line 11 to wait for the user's input but carries on - naturally to produce errors on end because of the lacking input. :confused: :confused: :confused:
Where do I go wrong ??
Norbert |
|
Back to top |
|
|
Martin
Joined: 09 Sep 2004 Posts: 43
|
Posted: Mon Jun 13, 2005 6:03 am Post subject: Window Problem - execution does not halt after %aw |
|
|
If you use the topmost option for %ww the window will stay on top.
i.e. iwin=winio@('%ww[toolwindow, topmost]&') |
|
Back to top |
|
|
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Mon Jun 13, 2005 9:51 am Post subject: Window Problem - execution does not halt after %aw |
|
|
[small]Martin Alderson wrote:[/small]
If you use the topmost option for %ww the window will stay on top.
i.e. iwin=winio@('%ww[toolwindow, topmost]&')
:confused: :confused: :confused:
... but will it stop execution after creation to wait for user input ??
sorry, but it will be some days till I get back to my system to test.
Norbert |
|
Back to top |
|
|
Martin
Joined: 09 Sep 2004 Posts: 43
|
Posted: Mon Jun 13, 2005 10:32 am Post subject: Window Problem - execution does not halt after %aw |
|
|
Because of the way %fr and %aw were designed, the child window will always act as though %lw had been specified.
I think the best way to get what you want is to use a %cc format code to attach a close window callback function to the child window. Then you can move the program code that you wish to execute after the window has closed to that routine. |
|
Back to top |
|
|
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Thu Jun 16, 2005 2:11 am Post subject: Window Problem - execution does not halt after %aw |
|
|
Well, nice to know this one.
You should expect to find info like this somewhere in the docs about %fr and/or %aw though, don't you ?
Norbert |
|
Back to top |
|
|
|