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

Home » Public Forums » archive » Re: object reference in 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: object reference in a structure [message #12890 is a reply to message #12857] Tue, 15 September 1998 00:00 Go to previous message
Phillip & Suzanne is currently offline  Phillip & Suzanne
Messages: 31
Registered: June 1998
Member
Charlie Solomon wrote:

;> Hi everyone...is it possible to put an object reference in a structure
;> variable? For example, I create a new object, then create a pointer to an
;> info structure for my widget and try to include the object reference in the
;> structure:

;> junk = 'charlie was here'
;> ptr_new, info( { junk:junk, oWindow:0 } )

Try this:

junk='charlie was here'
ptr_new, info({junk:junk, oWindow:Obj_New()} )

;> But when I try to access it bad things happen (I can get the actual error
;> message if needed). Here's how I try to access it:

;> (*info).oWindow = obj_new('IDLgrWindow') ;no worky
;> (*info).oWindow -> method, keywords ;no worky

;> Should I even be trying this? I want to be able to store the object
;> reference in info after it is created in another procedure and passed back
;> so that my widget program can modify properties and destroy it based on
;> xmanager events. Thanks!

The problem really turns out to be one of data types. An IDL object reference
is not a short integer. I believe it is a long integer, but Obj_New() returns
a null object reference that is definitely the correct type. Once this is set
up, I believe you'll be in great shape.

Phillip
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: test
Next Topic: Re: Setting ranges on surfaces

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

Current Time: Sat Oct 11 09:22:56 PDT 2025

Total time taken to generate the page: 1.27436 seconds