|
From: | Nima Talebi |
Subject: | [swarm-hackers] Conforming to <NSCopying> |
Date: | Sun, 15 Nov 2009 13:50:35 +1100 |
Hi, I'm trying to get my Heatbugs to conform to <NSCopying>...
#pragma mark NSCopying
- (id)copyWithZone:(NSZone *)zone {
Heatbug *clone = [Heatbug new];
[clone setWorld:[self world] Heat:[self heatSpace]];
[clone createEnd];
[clone autorelease];
return clone;
}
However the Swarm framework gives me an error...
*** event raised for error: BlockedObjectAlloc
*** function: -[Object_s copy](), file: /Users/nima/devel/FWSwarm/swarm/macosx/SwarmOSX/../../src/defobj/DefObject.m, line: 793
> Requested operation is defined by the Object superclass of the GNU
> Objective C runtime system, but is blocked from usage because its default
> implementation is incompatible with the model of zone-based allocation
> established by the defobj package. To allocate, free, or copy objects
> that use the defined model of zone-based allocation, one of the messages
> create:, createBegin:/End, drop, or copy: must be used instead.
*** execution terminating due to error
/Users/nima/devel/FWSwarm/swarm/macosx/SwarmOSX/../../src/defobj/Symbol.m:187 -[Error_c raiseEvent:]
Program received signal: “SIGABRT”.
[Prev in Thread] | Current Thread | [Next in Thread] |