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

Home » Public Forums » archive » Accessing class structure fields outside the class
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: Accessing class structure fields outside the class [message #90975 is a reply to message #90973] Tue, 19 May 2015 13:30 Go to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
On Tuesday, May 19, 2015 at 2:12:28 PM UTC-6, evan....@richmond.edu wrote:
> Hello everyone. I would like to access field values in class structures outside their class.
>
> For example:
>
> Pro class1__define
> struct = {class1, value:5, pointer:new_ptr(3)}
> end
>
> Pro main
> a = {class1}
> print, a.value, *a.pointer
> end
>
> This approach 'zeros' the values inside class1's structure and turns any pointers into a null pointer. Is there a way to access the field values in class1's struct outside the class? Among other reasons, I want to accomplish this without having class1's structure be defined in main so that other methods, functions, and procedures can operate on the field values as they change during a calculation

You can have your class inherit IDL_Object:

http://exelisvis.com/docs/IDL_Object.html

See the "IDL_Object and Property Access" section on this page:

http://exelisvis.com/docs/WhatsNew_in_8_0.html

Also, look at "Automatic Class Structure Definition" on this page:

http://exelisvis.com/docs/creating_an_object_class_1.html


You are nearly there.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: calling functions directily
Next Topic: Creaty dummy.jpeg with Linux command

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

Current Time: Fri Oct 10 12:56:15 PDT 2025

Total time taken to generate the page: 0.63745 seconds