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

Home » Public Forums » archive » Re: The proper way of catching mouse button events from a draw widget?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: The proper way of catching mouse button events from a draw widget? [message #50771] Wed, 18 October 2006 09:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Allan Whiteford writes:

>> Well, presumably you heard that it can't be done. :-)
>>
>>
>
> I think it perhaps could be... almost:
>
> If we get the user subroutine to supply its own function name and a
> magical index to the draw widget event handler then store all it's
> variables before returning.
>
> After the draw widget has collected the min and max x-range it can use a
> call_function to call back the original function which will take the
> index and essentially implement an entry point via a goto and then
> restore all the saved variables. It can then carry on with the min and
> max x-range.

A GOTO!? Your honor, I rest my case.

> However, my 'solution' is repulsive and there is no way I'm supplying
> example code for the above suggested catastrophe. One day far from now
> in a job interview someone might put it down in front of me and ask if I
> actually wrote it.

I'm certain we agree on this. -)

> I'm also of the opinion that if the above is the way to do it then it's
> almost indistinguishable from David's assertion that "it can't be done".

You are just trying to get on my good side, here.

> However if you're in the situation where you have code you can't
> refactor for whatever reason and using cursor is giving you the wrong
> answer then maybe it's easier (but certainly not better) than re-writing
> everything to function within how IDL is designed to do such things.

I'm not so sure, and anyway, he claimed that he wanted
to learn the "proper" way of doing this. This abomination
is certainly not that, IMHO. :-)

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: filled usersym
Next Topic: database access using JAVA or COM

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

Current Time: Thu Oct 09 11:45:54 PDT 2025

Total time taken to generate the page: 1.36422 seconds