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

Home » Public Forums » archive » Returning result from a widget program.
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: Returning result from a widget program. [message #12321 is a reply to message #12205] Mon, 13 July 1998 00:00 Go to previous messageGo to previous message
Vap User is currently offline  Vap User
Messages: 31
Registered: April 1998
Member
mirko_vukovic@notes.mrc.sony.com writes:


It's unclear exactly what you're asking. If the widget program you
call can be cast as a function, you can return the result of whatever
calculations/changes to data/... occur as the function result. Take a
look at Dave Fanning's PS_FORM.pro (http://www.dfanning.com and follow
your nose) for an example of this sort of thing.

If you're talking about a popup widget that can't, for some reason,
return the result in the return value, pass it a pointer to your data
and whatever space you might want to reserve and have the widget store
the pointer in a structure in its UVALUE. The pointer to the modified
data will be available to the calling program after the popup has been
destroyed.


If at all possible, go with option 1.

William Daffer


>
> In article <35A4BF4B.5FE452DE@sc.ehu.es>,
> Imanol Echave <ccaeccai@sc.ehu.es> wrote:
>> Hi people:
>>
>> I'm writting an IDL function that works with widgets. The user calls an
> IDL
>> function that shows an widget interface to input data. When the user pushes
> the
>> "OK" button the function has to return a result that depends on the input
> data.
>> My problem is where to store this result to return it. I can't use the UVALUE
> of
>> the widgets because when I want to return the result the widgets are
> destroyed.
>> Any advice?
>>
>
> (I guess it is my turn to show what I've learned about widget programming)
>
> common block, pointer variable?
>
> You can setup a widget cleanup routine (and frankly, I forget their syntax
> now), where you can do that kind of stuff.
>

Xmanager, 'name', ID , cleanup='name_of_cleanup_routine'

This overrides whatever routine was specified using the 'Kill_Notify'
keyword to Widget_Control.


> mirko
>
> you
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

--
I don't speak for JPL, it doesn't speak for me.
Well, not all the time, at least.
William Daffer <vapuser@haifung.jpl.nasa.gov>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New IDL FAQ location
Next Topic: Re:pickfile wierdness

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

Current Time: Wed Oct 08 17:27:40 PDT 2025

Total time taken to generate the page: 0.00458 seconds