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 

%co

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



Joined: 05 Jul 2006
Posts: 268

PostPosted: Tue Mar 08, 2011 10:36 pm    Post subject: %co Reply with quote

The following program prompts for an integer, creates a graphics area and then has an OK button. If the user tries to change the integer, and then moves the mouse over the graphics area the integer gets reset to the initial value of 2000. If the check_on_focus_loss line is deleted, then the reset value is retained because the default full_check is used. However, I really want to use check_on_focus_loss because; with %il imposing a lower limit of 1950, it can be annoying trying to type in the integer rather than using the up and down arrows. Removing full_mouse_input from %gr also solves the problem, but I need that for interacting with the graphics area.

How can I get the program to retain the changed input as the mouse is moved over the graphics area?

Code:
MODULE m
CONTAINS
 FUNCTION f()
  INTEGER :: f
  f=1
  RETURN
 END FUNCTION f
END MODULE m


WINAPP
PROGRAM p
!
  USE clrwin, ONLY: winio@
  USE m
!
  INTEGER :: i=2000
!
  iw=winio@('%co[check_on_focus_loss]&')
  iw=winio@('%il&',1950,2011)
  iw=winio@('%dd%rd &',1,i)
  iw=winio@('%^gr[full_mouse_input] &',100,100,f)
  iw=winio@('%bt[OK]')
!
END PROGRAM p
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu May 26, 2011 12:48 pm    Post subject: Reply with quote

Doesn't anyone know the answer to this?

(Just to keep the thread alive)

Eddie
Back to top
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Thu May 26, 2011 1:12 pm    Post subject: Reply with quote

Hmmm... I'm not sure if this is the solution, but if you set the value of f to 2 (instead of 1) in the module m, then it works.

Regards - Wilfried
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu May 26, 2011 2:24 pm    Post subject: Reply with quote

Wilfried, You just made it more mysterious ....

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


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

PostPosted: Thu May 26, 2011 2:47 pm    Post subject: Reply with quote

%co[chek_on_focus_loss] is having an unwanted side effect in this context.

Do you need it here?

Basically it is a bug in ClearWin= but it won't be easy to fix.

The return of f=2 prevents a screen update but more often you need to update the screen after applying the callback.
Back to top
View user's profile Send private message AIM Address
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