[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Geometry Archiving still not working the way a I wish
From: |
Paul E. Johnson |
Subject: |
Geometry Archiving still not working the way a I wish |
Date: |
Thu, 04 Feb 1999 15:37:27 -0600 |
In ObserverSwarm, I have a loop that creates "policyRaster" objects,
each is given a name for its title, but geometry archiving doesn't
record them separately. Instead, I get a .swarmArchiver file that is
corrupted. It looks like so:
(archiver
(list
(cons '(recruiter default)
(list
(cons 'ProbeDisplay-ObserverSwarm
(make-instance 'WindowGeometryRecord #:position '(1232 320)))
(cons 'ProbeDisplay-modelSwarm
(make-instance 'WindowGeometryRecord #:position '(64 64)))
(cons 'panelWidget
(make-instance 'WindowGeometryRecord #:position '(0 0)))
(cons 'proposalRaster
(make-instance 'WindowGeometryRecord #:position '(223 -9)))
(cons 'stabilityGraph-graph
(make-instance 'WindowGeometryRecord #:position '(813 27)))
(cons 'address@hidden@(address@hidden
(make-instance 'WindowGeometryRecord #:position '(442 442)))
Additional runs often crash with this error:
*** event raised for error: InvalidArgument
*** function: _i_InputStream_c__getExpr(), file: InputStream.m, line:
229
cons accepts only two arguments*** execution terminating due to error
Aborted (core dumped)
Here is ObserverSwarm snip from buildObjects: (The class WhiteRaster is
subclassed from ZoomRaster.)
-buildObjects {
id modelZone; // zone for model.
int i,j;
WhiteRaster * policyRaster;
[super buildObjects];
modelSwarm = [ModelSwarm create: self];
CREATE_ARCHIVED_PROBE_DISPLAY (modelSwarm);
CREATE_ARCHIVED_PROBE_DISPLAY (self);
[controlPanel setStateStopped];
policyRasterList=[List create: self];
for(i=0; i< 4; i++)
{
char rasterName[15];
policyRaster = [WhiteRaster create: [self getZone]];
[policyRaster setSpaceNumber: i];
sprintf(rasterName,"PolicySpace%02d",i);
[policyRaster setWindowGeometryRecordName:rasterName];
[policyRaster setWindowTitle: rasterName];
// SET_WINDOW_GEOMETRY_RECORD_NAME(policyRaster);
[policyRaster setColormap: colorMap];
[policyRaster setZoomFactor: 4];
[policyRaster setWidth: [[modelSwarm getPolicySpace:i] getSizeX]
Height: [[modelSwarm getPolicySpace:i] getSizeY]];
[policyRaster pack]; // draw the window.
[policyRasterList addLast: policyRaster];
....other rasters are created in here....
}
This creates 4 separate "policyRaster" objects which are named
PolicySpace00, PolicySpace01, PolicySpace02, and PolicySpace03. Their
Titles in the graphs show up that way, but the swarmArchiver still does
not record their positions separately.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (913) 864-9086
Lawrence, Kansas 66045 FAX: (913) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Geometry Archiving still not working the way a I wish,
Paul E. Johnson <=