Theocacao
Leopard
Design Element
Comment on "Things Developers Should Know About Leopard"
by Blain — Sep 29
NSImage * testImage = [[NSWorkspace sharedWorkspace] iconForFileType:@"txt"]; NSImage * copyImage = [testImage copy]; NSLog(@"Image: %@ vs %@",testImage,copyImage); NSEnumerator * ourEnumerator = [[testImage representations] objectEnumerator]; NSBitmapImageRep * thisRep; while (thisRep = [ourEnumerator nextObject]){ NSLog(@"Test image representation %x has bytes at %x", thisRep,[thisRep bitmapData]); } ourEnumerator = [[copyImage representations] objectEnumerator]; while (thisRep = [ourEnumerator nextObject]){ NSLog(@"Copy image representation %x has bytes at %x", thisRep,[thisRep bitmapData]); }

All the addresses are different when I run this. NSImage -[copy] copies all the way down. And given that NSData has secondary messages that explicitly mention nocopy, you can have it either way.

@Daniel: Could be worse. I'm so behind the curve in hardware, my keyboard is still ADB!

Also, wasn't MS Dev studio non-free for the longest time? Even now, express has some limitations. In which case, the difference is that we'll eventually get IB 3.0 for free*, as opposed to always being the have-nots.

*Okay, $129, most likely.
Back to "Things Developers Should Know About Leopard"
Design Element

Copyright © Scott Stevenson 2004-2015