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

Home » Public Forums » archive » object argument passing behaviour changed in v8.2.2?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
object argument passing behaviour changed in v8.2.2? [message #86250] Mon, 21 October 2013 14:21
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

I have some code that looks like:


! Create array for interpolated results
isrf = OBJARR(n_channel_detectors)

; Begin detector loop
FOR i = 0, n_channel_detectors - 1 DO BEGIN
PRINT, FORMAT='(6x,"Processing detector ",i4)', detector[i]

; Create new oSRF objects for this detector
osrf = OBJ_NEW('oSRF',Debug=Debug)
isrf[i] = OBJ_NEW('oSRF',Debug=Debug)

; Load raw SRF data
osrf->Load_Data

...etc...

; Compute frequency grid from osrf and load into isrf element
osrf->Compute_Interpolation_Frequency, $
isrf[i], $
/LoRes, $
Debug=Debug

; Perform interpolation of osrf on isrf element grid
osrf->Interpolate, $
isrf[i], $
Debug=Debug

...etc...

ENDFOR


Previously, the call to "Compute_Interpolation_Frequency" would allocate
the resulting object, fill it with data, and dutifully return everything
into "isrf[i]" which is also an argument to the "Interpolate" method.

Now, however, I'm finding that isrf[i] is an empty object right after
the call to "Compute_Interpolation_Frequency".

Did the passing behaviour for objects and object arrays change at some
point to behave similarly to passing structures (i.e. you can't pass a
structure array element and expect changes to make it out)?

If so, how does one perform a deep copy of an object into an object
array element?

Confusedly Yours,

paulv
[Message index]
 
Read Message
Previous Topic: How to write a function that can be apply to arbitrary dimension of multiple array!
Next Topic: most probable value of a data set

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

Current Time: Wed Oct 08 14:07:25 PDT 2025

Total time taken to generate the page: 0.00257 seconds