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

Home » Public Forums » archive » Re: large info structure?
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: large info structure? [message #56107] Wed, 03 October 2007 01:06 Go to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On Tue, 02 Oct 2007 15:10:57 -0000, markb77@gmail.com wrote:

> I've finished writing the front end and now I'm in the process of
> adding some analysis. What I'm noticing is that the info structure
> that gets passed around between event handlers is getting to be very
> large. Mine is up to 130 variables, at the moment.

How does this "info structure gets passed around between event
handlers?" Where is this stored? Are you worried by the program
copying this large structure on every event?

I'm not sure what your situation is, but suppose you have the info
structure stored in the top level widget, you can access it without
copying, like this:

pro event_handler,ev
widget_control,ev.top,get_uvalue=infostruct,/NO_COPY
...[handle event: make sure there is no return here!]...
widget_control,ev.top,set_uvalue=infostruct,/NO_COPY
end

If you don't like the /NO_COPY idea, you can for example have a
pointer (created with ptr_infostruct=ptr_new(infostruct) ) to your
info structure as UVALUE of the top level widget:

pro event_handler,ev
widget_control,ev.top,get_uvalue=ptr_infostruct
...[handle event: reffer to fields as (*ptr_infostruct).(i) ]...
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: envi_setup_head for TIFF
Next Topic: What is the main difference between a script and a procedure?

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

Current Time: Wed Oct 08 15:54:13 PDT 2025

Total time taken to generate the page: 0.00424 seconds