forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bug with radio buttons?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Fri Sep 05, 2008 7:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Mon Feb 01, 2010 7:49 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Feb 01, 2010 9:34 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Tue Feb 02, 2010 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Feb 02, 2010 8:35 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Wed Feb 03, 2010 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Feb 03, 2010 4:38 pm    Post subject: Reply with 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.

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
View user's profile Send private message AIM Address
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Thu Feb 04, 2010 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Feb 04, 2010 10:09 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Thu Feb 04, 2010 11:40 am    Post subject: Reply with quote

Thank you very much, your help is appreciated!
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Feb 11, 2010 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Wed Mar 03, 2010 3:48 pm    Post subject: Reply with quote

It does not solve that the problem might not be immediately noticed, but thank you anyways for this workaround!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group