I'm trying to follow along with the Objective-Chipmunk examples, namely the SimpleObjectiveChipmunk project, but I notice that ChipmunkObjectFlatten has been deprecated in 6.0.2?
Can anyone point me in the right direction as to how to get over this issue?
Thanks.
ChipmunkObjectFlatten Deprecated?
-
- Posts: 2
- Joined: Wed Oct 05, 2011 11:29 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: ChipmunkObjectFlatten Deprecated?
Ah, sorry about that. From the header:
So where you would have done:
Do one of this instead:
The Chipmunk Object protocol was modified to work with any nested NSFastEnumeration objects (NSArray, NSSet, etc) instead of only the flattened NSSets that the ChipmunkObjectFlatten() method created. Originally I had created it that way for what turned out to be imaginary performance reasons. So I fixed it to be more flexible.
Code: Select all
/// @deprecated since 6.0.2 Use [NSArray arrayWithObjects:] or similar instead.
NSSet * ChipmunkObjectFlatten(id <ChipmunkObject> firstObject, ...) __attribute__((deprecated));
Code: Select all
chipmunkObjects = [ChipmunkObjectFlatten(a, b, c, d, e, nil) retain];
Code: Select all
chipmunkObjects = [[NSArray alloc] initWithObjects:a, b, c, d, e, nil];
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 8 guests