Article # 305, added by Geoworks, historical record
| first | previous | index | next | last |

Object relocation/unrelocation in Vis/Meta objects in VM files.



Q. I have objects spread among different VM blocks. Some of these are
   Vis objects, and will be connected together via the standard Vis
   linkage, while other ones will be meta objects, and will contain
   optrs to some of the Vis objects in their instance data (the Vis
   objects have optrs to meta objects in their instance data as well).

   I'm unclear about how much of the object relocation/unrelocation the
   VM code will do. Will I have to do all the relocation work myself?

A. Object relocations are performed whenever the object block is read in
   from the file.

   Make sure you call VMPreserveBlocksHandle whenever you call VMAlloc
   (or VMAttach) for any blocks that will contain objects. Also, make
   sure your class definitions are set up properly so that object
   relocations will happen.

   And, of course, make sure the VMA_OBJECT_ATTRS attributes are set for
   the file.