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

Home » Public Forums » archive » widget event structure doesn't transfer
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: widget event structure doesn't transfer [message #81146 is a reply to message #81051] Tue, 14 August 2012 06:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kat writes:

> When I try to call my userROI data in widget 1, I get:
> % WIDGET_CONTROL: Invalid widget identifier: 143.
>
>
> Do you have any thoughts on this? Where did I go wrong?

Well, it appears you have gone wrong almost from the get-go. :-)

Mostly what I think you need to know is that IDL doesn't
suspend it's rules about local variables being protected
inside of procedures and functions just because you are
writing a widget program. Widget identifiers are local
variables. (This is your immediate problem, but there
are many others, too.)

You might want to read up on widget programming a bit.
IDL Programming Techniques is *very* old and outdated,
but the widget section is still pretty good. If you
could find a copy of that, it would help you a great
deal, I think.

If you want to call a second widget program to provide
information to the first, we call that a "pop-up" or
"dialog" widget. It is written as a function that returns
data (usually in the form of a structure) to the calling
program. You can read more about how to write it here:

http://www.idlcoyote.com/widget_tips/popup.html

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to prevent proliferation of leftover objects when NG plots are included in unit tests.
Next Topic: multiple contour plots with common color range

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

Current Time: Thu Oct 09 07:23:28 PDT 2025

Total time taken to generate the page: 1.20188 seconds