View previous topic :: View next topic |
Author |
Message |
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Fri Sep 05, 2008 7:34 am Post subject: |
|
|
Thanks for looking into it. Another workaround for ganged radiobuttons is to keep an integer variable that denotes the selected button, so the last state can be restored on every window creation (if the radiobutton window is closed along with the third window). This is not applicable in this sample case though.
As the effect is by times not immediately noticeable it would be nice if it was solved by times.
Thanks again! |
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Mon Feb 01, 2010 7:49 am Post subject: |
|
|
This bug is still present in the last ftn95 version (5.40) which, as already noted, is very unfortunate as the effect may go unnoticed for quite some time since the variable is changed *after* the window closes.
Is this going to be fixed? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Feb 01, 2010 9:34 am Post subject: |
|
|
If you are referring to the original %ga problem then I do not plan to do any more work on this. We know that %ga has its limitations but there are other ways to do approach this task. |
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Tue Feb 02, 2010 8:00 am Post subject: |
|
|
So you recommend not to use %ga at all? Or do you mean the usually not-appropriate hack by catching the window close callback of the window? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Feb 02, 2010 8:35 am Post subject: |
|
|
By all means use %ga if it works in the context of your code but if it fails to produce the goods then do the ganging directly by putting a callback function on each radio buttion. i.e. your callback will be written to control the collective states of all the radio buttons (only one on at a time). |
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Wed Feb 03, 2010 3:17 pm Post subject: |
|
|
Quote: | but if it fails to produce the goods then do the ganging directly |
As already noted it is usually not obvious that the bug is visible since it changes a variable after the usual interaction (window with radio buttons is open) happens.
But I take that there's no interested in fixing this bug. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Feb 03, 2010 4:38 pm Post subject: |
|
|
I have already had a look at this and I found that there would be a great deal of work needed to fix this problem. Maybe even a redesign of %ga.
Given the ease of doing things differently I have decided that further work in this are would be too expensive.
I hope that we can now draw a line under this issue.
Thanks |
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Thu Feb 04, 2010 7:51 am Post subject: |
|
|
Quote: | I have already had a look at this and I found that there would be a great deal of work needed to fix this problem. Maybe even a redesign of %ga. |
The code snippet I've posted above does NOT use %ga at all but still shows the bug. When using callbacks to simulate the %ga effect, the same buggy behaviour when closing the window appears, the callback function of the first radio button is (erroneously) called.
Quote: | I hope that we can now draw a line under this issue. |
I won't comment on this sentence. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Feb 04, 2010 10:09 am Post subject: |
|
|
My apologies. I thought that you were asking for a problem with %ga to be fixed.
I can see the problem and can identify the point of failure in ClearWin+. A fix may take a little while. |
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Thu Feb 04, 2010 11:40 am Post subject: |
|
|
Thank you very much, your help is appreciated! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Feb 11, 2010 2:38 pm Post subject: |
|
|
I have had a look at this and I cannot find a way to block the message that is causing the problem without causing other problems elsewhere.
The best that I can do at the moment is to provide an option [isolate] on %ww that will fix the problem locally. For the next release the following code will work correctly with this option.
Code: | winapp
Program Test_Radio_Button
integer :: iw,winio@,ipos,jpos,lw_handle,irb
irb = 0
iw = winio@ ('%lw&',lw_handle)
iw = winio@ ('%`ca[Test]&')
iw = winio@ ('%rb[RB1]%nl&',irb)
iw = winio@ ('%gp',ipos,jpos)
iw = winio@ ('%ww[no_sysmenu,isolate]&')
iw = winio@ ('%`ca[Window]&')
iw = winio@ ('%sp&',ipos+20,jpos+20)
iw = winio@ ('%4bt[Close]')
end |
|
|
Back to top |
|
|
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Wed Mar 03, 2010 3:48 pm Post subject: |
|
|
It does not solve that the problem might not be immediately noticed, but thank you anyways for this workaround! |
|
Back to top |
|
|
|