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

Home » Public Forums » archive » Saved objects.
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: Saved objects. [message #12800 is a reply to message #12728] Wed, 09 September 1998 00:00 Go to previous messageGo to previous message
seanr is currently offline  seanr
Messages: 10
Registered: August 1998
Junior Member
> How about something like this:
>
> thisClass = Obj_Class(self)
> Resolve_Routine, thisClass + '_define'
>
> I haven't tested this, but don't see any reason it wouldn't work.
> Resolve_Routine is the way IDL procedures and functions can
> be compiled from *within* other procedures and functions.
>
> Cheers,
>
> David
>
> ----------------------
>
> J.D. replied with this:
>
> This will certainly work, but has the unfortunate side-effect of
> re-compiling every method each time an object is read from disk... I
> thought of modifying it slightly to the tune of:
>
> thisdef=Obj_Class(self)+'__DEFINE'
> if (where(routine_info() eq thisdef))[0] eq -1 then
> resolve_routine,thisdef
>
> So that it would only compile if presently undefined.
>
> JD
> ----------------------------------------------------------
>

I can see one large hole in this type of procedure. What if you are running
the application on a runtime liscense? In this case, the runtime liscense
cannot compile any source code, and will fail. Any ideas around that
limitation?

Also, not in the quoted text, you were wondering if the
/RELAXED_STRUCTURE_ASSIGNMENT works for objects. It does...sortof. I'm
currently working with RSI tech support on an apparent bug when you save an
object with nested structures in the self structure, then add/change a field
in one of the nested structures, and attempt to restore it. The restore will
respond with the verbose message from restore:

RESTORE, FILENAME = getfile, RESTORED_OBJECTS=obj_restore, /VERBOSE,
/RELAXED_STRUCTURE_ASSIGNMENT

% RESTORE: Portable (XDR) SAVE/RESTORE file. % RESTORE: Save file written by
user@Microsoft Windows Host, Fri Aug 28 09:04:00 1998. % RESTORE: IDL version
5.1 (Win32, x86). % RESTORE: Recovering incompatible definition of structure
OUTPUTDATA using relaxed structure assignment rules. % RESTORE: Recovering
incompatible definition of structure DIME_PROJECT using relaxed structure
assignment rules. % RESTORE: Restored variable: TEMPPROJ. % RESTORE: Did not
expect relaxed structure assignment definition for OUTPUTDATA to be in use.

If I then attempt to reference the restored object, I get the following error:

% XMANAGER: Caught unexpected error from client application. Message
follows... % Undefined object class: DIME_PROJECT.

The strange thing is, if I do another restore again, I get the same response
from RESTORE, but it succeeds and does not fail when I reference the object
this time.

If I only make changes to the top level self structure, everything is fine.

Has anyone worked with saved objects that have nested structures and change
the nested structure fields between save and restore sessions?

------------------------------------------------------------ ---------
Sean P. Rumelhart Positive Systems, Inc.
seanr@possys.com 250 Second St. East
PH: 406.862.7745 Whitefish MT 59937
FAX: 406.862.7759 www.possys.com
------------------------------------------------------------ ----------

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Why not use free code?
Next Topic: finding array subscripts of minimum value of 3 dim. fltarr

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

Current Time: Sat Oct 11 01:53:57 PDT 2025

Total time taken to generate the page: 0.71150 seconds