comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Basic Event Handling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Basic Event Handling [message #55216] Tue, 07 August 2007 09:54
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Aug 7, 5:13 am, Gaurav <selfishgau...@gmail.com> wrote:
> I tried to think it out in terms of a timer event but that did not
> help me much.

Why not do the animation as a series of timer events instead of in a
FOR loop? Have a flag that indicates to keep zooming. Set the flag if
the user single-clicks or if the "loop" variable hits the end. Check
the flag when the timer goes off and do the appropriate thing.

For an example,

http://michaelgalloy.com/2006/07/25/timer-events-to-process- a-task-in-the-background.html

Mike
--
www.michaelgalloy.com
Re: Basic Event Handling [message #55221 is a reply to message #55216] Tue, 07 August 2007 06:55 Go to previous message
asantiago is currently offline  asantiago
Messages: 4
Registered: February 2006
Junior Member
Long time ago I write a set of classes that implements an event-action
mechanism (like event-listeners in Java) for IDL. It is published
here: http://www.ittvis.com/codebank/search.asp?FID=334 and is
currently working in some projects successfully.

When you click with the mouse you can emit a "clickEvent" that can
call a method that changes a property. Later on every for loop you can
check for that property and stop processing if it is changed.


On Aug 7, 1:13 pm, Gaurav <selfishgau...@gmail.com> wrote:
> I have a very basic IDL related query. It being: Is there a a way to
> check for the arrival of new events while the program control is busy
> with some other operation like- running through a loop?
>
> The exact situation when I need this is that I have built a program
> wherein a spherical object is displayed in an object window. The user
> is allowed to zoom into the object by double clicking on it. The
> zooming process is carried out animatedly by using the viewport
> transformations that run in a for loop between two predefined levels.
> This user can zoom in, nearer to the object by double clicking on it
> successively. But as these levels of zoom are predefined, the user has
> no control over the zoom level. What I want to do is to program in
> such a way so that after one has double clicked onto the object and
> the program control is running through the for-loop and thus zooming
> in onto the object- the user should be able to single click onto the
> objet to bail out of the for loop with the loop variable set at the
> level it was when the new event arrived.
>
> I tried to think it out in terms of a timer event but that did not
> help me much. In other languages they allow use of multiple threads
> which would have been 'just the thing' for me, but is not available
> here. There is a concept of something called 'IDL_IDLBridge' that
> appears to be useful but the documentation lacks enough information in
> the form of a simple example.
>
> I am sure that there must be a very routine way out of this trouble as
> many existing applications (Though I am yet to find any such IDL based
> applications) are able to do exactly what I want. It would be a great
> help if you could bail me out of this.
>
> Yours sincerely,
> Gaurav Kumar
Re: Basic Event Handling [message #55227 is a reply to message #55221] Tue, 07 August 2007 04:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gaurav writes:

> I am sure that there must be a very routine way out of this trouble as
> many existing applications (Though I am yet to find any such IDL based
> applications) are able to do exactly what I want. It would be a great
> help if you could bail me out of this.

http://www.dfanning.com/programs/progressbar.zip

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Use IDL6.0 to read Fortran 90 written data
Next Topic: Re: how to tell it is character or it is number?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:34:54 PDT 2025

Total time taken to generate the page: 0.02113 seconds