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

Home » Public Forums » archive » Re: sharing information across widget hierarchies
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: sharing information across widget hierarchies [message #72100] Mon, 09 August 2010 18:28 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 6, 11:23 pm, Chris <beaum...@ifa.hawaii.edu> wrote:
> Ok, I can get around this by attaching the _same_ event function to
> widgets 2 and 3. Now at least a single function gets called whenever
> an event happens; but there's no single widget in which to store state
> information. So then I have to store the state information as a
> _pointer_ in the uvalue to widgets 2 and 3. This means that I'm
> constantly dereferencing the state information pointer, which is much
> more awkward (syntactically) than working with a single, non-pointer
> variable (does anyone else hate how ugly x =
> (*(*state_ptr).big_array_ptr)[first_col, *] looks?)

With IDL 8, you can both have simpler code and only pass around a
reference, using a hash instead of a structure. This removes two
levels of indirection: the one used to pass a pointer instead of
copying the structure, and the other to have dynamic fields in it. For
instance, the fragment above could be just

(state_hash['big_array'])[first_col,*]
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL 8.0 now available
Next Topic: Re: svdfit-measure_errors

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

Current Time: Thu Oct 09 22:58:57 PDT 2025

Total time taken to generate the page: 0.00546 seconds