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

Home » Public Forums » archive » Widget Event_Pro question
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_Pro question [message #59593 is a reply to message #59480] Wed, 02 April 2008 09:10 Go to previous messageGo to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Apr 2, 4:47 pm, David Fanning <n...@dfanning.com> wrote:
> Spon writes:
>> I think I'm already doing what you suggest, but just to be sure:
>
>> Graphs = PTR_NEW([-1L])
>
> I wouldn't do this. If there is nothing in it, I would
> probably make it a null pointer:
>
> graphs = PTR_NEW()
>
> Then check to see if I had a valid pointer in my code
> before I used it.
>
> Or, if you *want* a valid pointer, but don't have anything
> to put in it, you can just do this:
>
> graphs = Ptr_New(/ALLOCATE_HEAP)
>
> Now, you have a valid pointer:
>
> IDL> Print, Ptr_Valid(graphs)
> 1
>
> But, the thing inside it is an undefined variable:
>
> IDL> help, *graphs
> <PtrHeapVar1> UNDEFINED = <Undefined>
>
> You can stick something in it:
>
> *graphs = [widgetID]
>
> You can even find out how many things are in it:
>
> IDL> Print, N_Elements(*graphs)
>
>> Oh, and another question while I'm at it: I'm trying to check if a
>> widget still exists before trying to load its UVal, I thought that
>
>> IF WIDGET_INFO(GraphUVal.GroupLeader, /ACTIVE) THEN BEGIN
>
>> would do what I want, but apparently the /ACTIVE keyword doesn't work
>> with an argument.
>
> I don't know what ACTIVE does. The keyword you want
> is VALID_ID.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Thanks David, you're a great help as usual :-)

Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ITTVIS to replace all IDL developers with robots
Next Topic: Re: IDL Workbench Path Woes

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

Current Time: Thu Apr 30 10:19:03 PDT 2026

Total time taken to generate the page: 2.24220 seconds