How to stop pickPoint()?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2006   #1
Post How to stop pickPoint()?

Hi!

How can I stop the pickPoint() operation, e.g. if the user clicks on another button before he finished picking a point as he's supposed to:


    on someButton pressed do (
 	p1 = pickPoint()	  -- wait for user to pick a point
    )
    
    on anotherButton pressed do (
 	-- user pressed another button before he 
 	-- finished the last pick point operation, so:
    
 	stop_Pick_Point()	   -- but how???
    
 	-- pick another point will not work while 
 	-- another pickPoint operation is in progress...
 	p2 = pickPoint()	 
    )
    
    



Does anybody has a solution for this?

Thanks,
Chris
 
Old 02 February 2006   #2
Re:

You can disable the second button and enable it as soon as the user gives the first point. For example youo create the ui like this

 
button b1 "First Point" 
button b2 "Second Point" enabled:false


Now when you handle the first point pick enable the second button like this.

 
on b1 pressed do 
(
   p1 = pickpoint()
   b2.enabled = true
)
 
on b2 pressed do
(
   p2 = pickpoint()   
)


Hope this helps
Thanx
Mobeen
 
Old 02 February 2006   #3
Thank you mobeen!
I tried to work around like you described it. But the result ist not satisfying because the user always has to click right inside the active viewport in order to stop the operation.
I think I'm trying the "on tool create" events instead...
Thanks,
Chris
 
Old 02 February 2006   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:34 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.