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

Home » Public Forums » archive » Re: Treating an object as a 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: Treating an object as a structure [message #65429 is a reply to message #65426] Wed, 04 March 2009 12:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
llo writes:

> If I've a struct I can do something like that:
>
> a={s:'string', l: 0l}
> print, n_tags(a)
> print, tag_names(a)
> help, a, /str
> etc.
>
> But if I've an object I can't do the same... Is it possible to parse
> all the attributes inside the object using something similar ?
> I mean, I don't want to use the GetProperty method, I only want to
> know which attributes are stored in the definition of the object.
>
> pro object__define
> str ={ object, $
> attribute_s: '', $
> attribute_l: 0l }
> end
>
> The object saves a struct. It could be possible to take information
> about this without the use of the getproperty method.

a = Obj_New('object')
HELP, Create_Struct(NAME=Obj_Class(a)), /Structure

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Go figure
Next Topic: IDL help error for Scale3 procedure.

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

Current Time: Sat Oct 11 17:29:44 PDT 2025

Total time taken to generate the page: 1.84350 seconds