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

Home » Public Forums » archive » Re: V8.2 compilation error, works in V8.1
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: V8.2 compilation error, works in V8.1 [message #80435 is a reply to message #80434] Fri, 01 June 2012 10:23 Go to previous messageGo to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Friday, June 1, 2012 5:51:31 PM UTC+2, wlandsman wrote:
> We are getting many compilation errors in V8.2 for code that worked in V8.1. Apparently, there was a loophole in V8.1 that allowed one to directly access an object's variables in certain case, but now a line like
>
> self.obj2.index
>
> gives an error
> % Expression must be a structure in this context: <OBJREF (<ObjHeapVar2(OBJ2)>)>
>
> One can always access the variable with a GETPROPERTY, and I suppose this might have been a "bug fix". Is there any place where one can get a list of the V8.2 bug fixes?
>
> Below I give an example with two simple objects.
>
> IDL> t = obj_new('obj1')
> IDL> t.printvalue
>
> gives an error in V8.2 but not V8.1
>
> ;obj1__define.pro
> pro obj1::printvalue,index=index
> print,self.obj2.index
> end
> pro obj1::getproperty,obj2=obj2
> if arg_present(obj2) then obj2 = self.obj2
> end
> function obj1::init,obj2=obj2
> if ~isa(obj2,'obj2') then self.obj2 = obj_new('obj2')
> return,1
> end
> pro obj1__define
> compile_opt idl2
> obj1 = {obj1, $
> obj2:obj_new()}
> end
>
> ;obj2__define.pro
> pro obj2::getproperty,index=index
> if arg_present(index) then index = self.index
> end
> pro obj2__define
> compile_opt idl2
> obj2 = {obj2, $
> index:0L}
> end

After replacing 'print,self.obj2.index' with 'print,(self.obj2).index', it works. So the loophole is still there :-)

regards,
Lajos
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DEM extraction
Next Topic: OBJ_NEW: Infinite or invalid (NaN) operands not allowed. IDL 7 vs 8 discrepancy?

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

Current Time: Wed Oct 08 19:36:25 PDT 2025

Total time taken to generate the page: 0.00400 seconds