swarm-support
[Top][All Lists]
Advanced

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

Drop doesn't work after createBegin:,createEnd:


From: Benedikt Stefansson
Subject: Drop doesn't work after createBegin:,createEnd:
Date: Fri, 30 Jan 1998 19:21:50 -0800

Hi,

I guess Roger is the one to answer this one.  It's one of my pet peeves
with Swarm, and I've never been able to figure it out from the docs.

Here's the deal: If you override the createEnd: method with your own and
use the

agent=[Agent createBegin: [self getZone]];
(set some parameters)
agent=[agent createEnd]

form, and later call [agent drop] on this agent, you get a run-time
error, and SIGABRT crash. The crash message looks like this:

error: Zone_c.Creating (class)
Zone_c.Creating does not recognize dropAllocations:

Now, if I change the -createEnd method name in the agent to something
like "initialize" and use

agent=[Agent create: [self getZone]];
(set some parameters)
agent=[agent initialize];

the subsequent [agent drop] call works. Seems odd and inconsistent to
me, and the docs make no mention of it.

I think that this defies the whole purpose of introducing two different
"protocols" for creating objects in the first place, i.e.simple create
vs. createBegin,createEnd

I guess my question is, is this a bug or a feature?

Regards,
-Benedikt

------------------
Benedikt Stefansson                 address@hidden
Department of Economics, UCLA       Fax. (310) 825-9528
Los Angeles, CA 90095-1477          Tel. (310) 825-4126



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