swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to catch a controPanel Quit?


From: Marcus G. Daniels
Subject: Re: how to catch a controPanel Quit?
Date: 08 Jul 1999 09:14:56 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.11

>>>>> "RLR" == Rick Riolo <address@hidden> writes:

RLR> But that didn't catch the quit, it just went on (to build model
RLR> objects, etc). 

It's a bug in ActionCache.  Here's a fix:

Index: ActionCache.m
===================================================================
RCS file: /cvs/hive/Swarm/swarm/src/simtoolsgui/ActionCache.m,v
retrieving revision 1.13
diff -c -r1.13 ActionCache.m
*** ActionCache.m       1999/05/28 21:08:02     1.13
--- ActionCache.m       1999/07/08 16:10:14
***************
*** 252,262 ****
    // when control finally gets back to controlpanel, it will
    // fall out of the busy wait loop and continue at the point
    // from which waitForControlEvnt was called.
!   if (([ctrlPanel getState] == ControlStateStopped)
!       && !(strcmp (cmd, "Stop") == 0
!            || strcmp (cmd, "Save") == 0))
!     [ctrlPanel setState: ControlStateRunning];
!   
    // create a 'cmd' action
    anAction = [ActionHolder createBegin: [self getZone]];
    [anAction setActionName: cmd];
--- 252,265 ----
    // when control finally gets back to controlpanel, it will
    // fall out of the busy wait loop and continue at the point
    // from which waitForControlEvnt was called.
!   if ([ctrlPanel getState] == ControlStateStopped)
!     {
!       if (strcmp (cmd, "Quit") == 0) 
!         [ctrlPanel setState: ControlStateQuit];
!       else if (!(strcmp (cmd, "Stop") == 0
!                  || strcmp (cmd, "Save") == 0))
!         [ctrlPanel setState: ControlStateRunning];
!     }
    // create a 'cmd' action
    anAction = [ActionHolder createBegin: [self getZone]];
    [anAction setActionName: cmd];


                  ==================================
   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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]