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

Home » Public Forums » archive » V8.2 compilation error, works in V8.1
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
V8.2 compilation error, works in V8.1 [message #80440] Fri, 01 June 2012 08:51
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Basic Array Subscripting Question
Next Topic: Deriving a probability function from cgHistoplot

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

Current Time: Sat Oct 11 02:31:17 PDT 2025

Total time taken to generate the page: 0.47805 seconds