[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yay, windows! nay, restart.
From: |
Ginger Booth |
Subject: |
Re: yay, windows! nay, restart. |
Date: |
Mon, 06 Apr 1998 13:49:47 -0400 |
Hi, Alex,
> If you are trying to make a GUISwarm a sub-Swarm of a regular Swarm,
> then unfortunately, you are bound to run into trouble with the GUI.
> The reason, is, the current implementation of GUISwarm is really still
> a hack. (As Marcus would say,) Sorry. ....
Thanks for the ideas! activateIn: nil didn't pan out, but
calling GUI_EVENT_SYNC() before [[self getSwarmActivity] run] on
my top (nolongerGUI) Swarm did work. GUI_EVENT_SYNC() appears to be
what actually creates windows. If there's a different hack you feel
would be more elegant, please let me know.
I dunno about a generic solution. It seems to me the current
scheme would work fine if the if/else conditions in
ControlPanel-startInActivity were a tad more straightforward. And
possibly permitting one to disable controlPanel on a particular
GUISwarm if you didn't want that controlPanel.
--------
Next problem: multiple runs. I appear to have a Catch-22 in
running my next run. If I try to activate the same activity again, it
says that activity is already activated and bombs. If I don't activate
the activity again, it says the activity is already finished, and bombs.
How do I restart activities correctly? Or whatever.
In main.m, I have:
...stuff...
[geckoControl buildObjects];
do {
[geckoControl buildActions];
[geckoControl activateIn: nil];
[geckoControl go];
} while ([geckoControl getGeckoRuns] > 0);
return 0; // all done! Exit.
geckoControl buildActions looks like:
-activateIn: (id) swarmContext {
[super activateIn: swarmContext];
[geckoModelSwarm activateIn: self];
if (displayFlag)
[geckoDisplaySwarm activateIn: self];
[reportSchedule activateIn: self];
[stopSchedule activateIn: self];
setupFlag = 1;
return [self getSwarmActivity];
}
Executing this yields (at second run):
*** event raised for error: InvalidOperation
** function: _i_CSwarmProcess__activateIn_(), file: SwarmProcess.m, line: 171
> Swarm has already been activated. A swarm cannot be activated more than
> once.
*** execution terminating due to error
Aborted
So I tried saying in geckoControl-activateIn, if not first time,
don't do it:
-activateIn: (id) swarmContext {
BOOL firsttime = 1;
if (firsttime) {
firsttime = 0;
[super activateIn: swarmContext];
[geckoModelSwarm activateIn: self];
if (displayFlag)
[geckoDisplaySwarm activateIn: self];
[reportSchedule activateIn: self];
[stopSchedule activateIn: self];
setupFlag = 1;
}
return [self getSwarmActivity];
}
This also bombs:
*** event raised for error: SourceMessage
*** function: auditRunRequest(), file: XActivity.m, line 52
> cannot run an activity that is already completed
*** execution terminating due to error
Aborted
Unpleasantly enough, I cannot break at line 52, XActivity.m in gdb.
There's a bunch of errors in the gdb *Command Buffer* window, ending
with:
[failed reading symbols from DLL]
"/WINNT/System32/msidle.dll": error reading line numbers
Program exited with code 0203000.
(gdb) bt
No stack.
In case you need/want it, you can pull Gecko-in-port-progress from:
http://peaplant.biology.yale.edu:8001/~ginger/ftp/geckoNTdebug.tar.gz
(You can comment out rectangleX0: in QuadDisplay.m if need be.)
Thanks!
Ginger
==================================
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.
==================================
- no windows...., Ginger Booth, 1998/04/04
- Re: no windows...., Marcus G. Daniels, 1998/04/04
- Re: yay, windows! nay, restart.,
Ginger Booth <=
- Re: yay, windows! nay, restart., Ginger Booth, 1998/04/06
- Re: yay, windows! nay, restart., Ginger Booth, 1998/04/06