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 #56181 is a reply to message #56107] Thu, 04 October 2007 15:40 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
> 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

Or, more aptly:

; make sure there is no return here, or any error or other stoppage

The problem with this NO_COPY method is that if any sort of stop,
including an error, happens while the event is being handled, your widget
program is "broken" and must be restarted, since the info UVALUE has gone
missing. If instead you store state information in a permanent place,
like on the pointer or object heap, you can easily patch up your broken
event code, retall, and continue where you left off. *So* much nicer for
development. I vote to ban /NO_COPY from general recommendation. It's a
bit more cumbersome to replace infostruct.x with (*infoptr).x, which is of
course why object widgets are so attractive (self.x).

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
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 17:39:31 PDT 2025

Total time taken to generate the page: 0.00462 seconds