[Drawkit] DKShapeGroup bump in the road
Allan Daly
allandaly at me.com
Thu Apr 16 22:04:49 PDT 2009
Graham, (or anyone else who might have used DKShapeGroups before)
I'm trying to do something that seems very simple to me, but it's not
working. Here's the issue.
NSRect rectToDraw = NSMakeRect(100, 100, 50, 50);
DKDrawableShape * r = [[DKDrawableShape alloc]initWithRect:rectToDraw];
NSMutableArray * a = [NSMutableArray arrayWithCapacity:1];
[a addObject: r];
DKShapeGroup * g = [DKShapeGroup groupWithObjects: a];
NSLog(@"the number of objects in the group is %i", [[g groupObjects]
count]);
// prints "the number of objects in the group is 0"
I cannot figure out why does this code not properly create a new
DKShapeGroup containing 1 object.
Any thoughts?
Thanks.
-Allan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20090416/5dede876/attachment.htm>
More information about the Drawkit
mailing list