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

Home » Public Forums » archive » Re: Passing objects and parenthesis... doing something wrong here?
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: Passing objects and parenthesis... doing something wrong here? [message #82680 is a reply to message #82679] Wed, 09 January 2013 08:47 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Wednesday, January 9, 2013 5:35:01 PM UTC+1, Chris Torrence wrote:
> Hi Helder,
>
>
>
> This was a bug, but has now been fixed. However, looking at my change log, it looks like it was fixed for IDL 8.2.
>
>
>
> Is it possible that you are running either IDL 8.1, or a beta version of IDL 8.2?
>
>
>
> If you want, try the following code:
>
>
>
> pro test_junk::mymethod
>
> o1 = obj_new('idlgrplot')
>
> o1.symbol = obj_new('idl_container')
>
> print, o1.symbol.nlist
>
> ; % Attempt to call undefined method: 'IDL_CONTAINER::GetProperty'.
>
> end
>
>
>
> pro test_property_on_object
>
> a = {test_junk, field1: 0}
>
> a = obj_new('test_junk')
>
> a->mymethod
>
> end
>
>
>
> If you get a syntax error when you save and run this, then you must be running an older version of IDL.
>
>
>
> Hope this helps!
>
>
>
> -Chris
>
> ExelisVIS
>
> p.s. you actually don't need to have a cleanup method for these objects, or call obj_destroy, because the automatic garbage collection will take care of it. :-)

Hi Chris,
thanks for the answer... my heart starts beating again. I get an error with your code on my laptop:

% Expression must be a structure in this context: <OBJREF (<ObjHeapVar4(IDL_CONTAINER)>)>.
% Execution halted at: TEST_JUNK::MYMETHOD 4 F:\Test\testobjects.pro
% TEST_PROPERTY_ON_OBJECT 11 F:\Test\testobjects.pro
% $MAIN$

I'm running IDL 8.2.0, Build id: 20120410 (from the help window).

I guess this is a beta version and tonight I will update. At least I know that the code I've written does not need major rewriting/mending...

Thanks again.

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idlwave: Breakpoints don't work
Next Topic: String to float

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

Current Time: Fri Oct 10 05:35:56 PDT 2025

Total time taken to generate the page: 0.95995 seconds