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 

Graphics region and file selection interaction

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Fri Jun 23, 2006 4:01 am    Post subject: Graphics region and file selection interaction Reply with quote

Hi,

not sure if this has been solved in recent versions, but in our current version (FTN95 v. 4.6.0.0) I found the following bug:

I have a window with a graphics region (%gr) defined. While this graphics region is open, I open a file selection menu. If I select a file in that menu and the selection click occurs over the graphics region, Clearwin mistakenly triggers the callback function that is meant for regular clicks on the region (a zoom e.g.).
I managed to circumvent the effect by using a flag that lets the callback function distinguish whether it has been regularly or mistakenly called, but I just wanted to post the bug anyway.

Rainer
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Jun 23, 2006 5:47 am    Post subject: Graphics region and file selection interaction Reply with quote

Rainer

I am not sure that one should call this a bug.
If the mouse is still down when the file selection dialog closes then a subsequent mouse up will necessarily be reported to the callback.

I suspect that the behaviour will be the same in the current release (4.91) and that, if we try to program it out, then someone's existing code will suffer.

HOwever, it sounds like you have a working fix for the problem that may be of general interest.
Back to top
View user's profile Send private message AIM Address
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Fri Jun 23, 2006 6:27 am    Post subject: Graphics region and file selection interaction Reply with quote

Hi,

well, maybe not a bug, just a counterintuitive irregularity. Being the user I guess I would expect the program to ignore the supposed click on the graphics region. As I said, in my case the action for the click on the graphics region is a zoom. Naturally, the user wouldn't expect the program to zoom in on the region when loading a file via a button outside of the graphics region, just because the actual selection of the file occurs in a window that happens to overlap with the graphics region. Smile

My workaround is pretty simple. Along with the click to load a file I set a flag that tells the zoom routine not to perform the zoom. Instead it resets the flag to its default value and returns immediately. This way, the flag will be set for the shortest necessary time and any real click on the graphics region will trigger the desired zoom undisturbed.

Rainer
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Jun 23, 2006 9:24 am    Post subject: Graphics region and file selection interaction Reply with quote

Rainer

I think that you have not fully understood what I was trying to say.

The mouse click does not pass through the File selection box.
What happens is that the mouse state changes immediately after the selection box has closed.
Typically the mouse is down to close the file selection box and, after the box has closed, the mouse state changes from down to up. It is this state change that is passed to the callback function.
Back to top
View user's profile Send private message AIM Address
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Fri Jun 23, 2006 9:33 am    Post subject: Graphics region and file selection interaction Reply with quote

I understood that. And it is counterintuitive that an action that started (mouse click down) in a different box and was referring to that box affects the graphics region. It could easily be caught by recognizing when the action started, at least from the pure logics.
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
Page 1 of 1

 
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