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

Home » Public Forums » archive » Object epiphany: A new way of building widget applications
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: Object epiphany: A new way of building widget applications [message #25378 is a reply to message #24570] Tue, 12 June 2001 09:18 Go to previous messageGo to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Mark Hadfield wrote:
>
> From: "Martin Schultz" <martin.schultz@dkrz.de>
>
> Hi Martin (and idl-pvwave groupies)
>
> I finally got around to looking at your object widget stuff and I must say I
> am impressed (though I haven't yet grasped all the ins and outs). I like the
> idea of storing an "object reference, method name" structure in each
> widget's UVALUE so that events from that widget can then be translated into
> method calls. Now why didn't I think of that?

Hmm... I had used something like this a few years ago, but instead I
just saved the "action" in the UVALUE, and in the event handling method
I used something like:

widget_control, ev.id, get_uvalue=action
if action eq 'bgroup' then action=ev.value
case action of
'someaction': self->dosomething, /SOMETHING
....
else: call_method,action,self ;all others, just call the method
endcase

This is actually fairly nice, since you can add new functionality to the
widget program without ever visiting the event code, but you don't
*require* a method for all trivial events which occur, instead just
catching those which aren't specifically handled and sending them on
their way to special-purpose methods. Also note how I translate
"actions" on the fly... so for instance a button and a menu item could
trivially perform the same function. It also pares down the even
handler in size... always a good thing.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Graphics Card/GL
Next Topic: Re: IDL and NetCDF

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

Current Time: Fri Oct 10 03:32:49 PDT 2025

Total time taken to generate the page: 0.72057 seconds