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

Home » Public Forums » archive » Re: Object Funkiness
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 Funkiness [message #9646] Fri, 01 August 1997 00:00 Go to previous message
Phil Williams is currently offline  Phil Williams
Messages: 78
Registered: April 1996
Member
J.D. Smith wrote:
>
> J.D. Smith wrote:
>>
>> OK OOP experts. Here's a conundrum...
>>
>> here's a procedure to test dynamic binding of methods in IDL...
>>
>> pro testdb
>> a=obj_new('eeke','a')
>> b=obj_new('eeke','b')
>> list=[a,b]
>> ran=fix(randomu(sd) ge .5)
>> list[ran]->Message, ran, 1-ran
>> obj_destroy,list
>> return
>> end
>>
>> and the file eek__define.pro contains:
>>
>> pro eeke::Message, ran, ran2
>> print,self.val,' random: ',ran, ran2
>> return
>> end
>> function eeke::Init,val
>> self.val=val
>> return,1
>> end
>> pro eeke__define
^^^^^^^^^^^^^^^^^
The __define method should be a FUNCTION. I'm sure once this is done
everything should work fine.

>> struct={eeke,val:''}
>> return
>> end
>>

phil

--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: sound from IDL
Next Topic: Advanced IDL Programming Course

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

Current Time: Sat Oct 11 05:21:11 PDT 2025

Total time taken to generate the page: 1.44142 seconds