From: Charles S. <bas...@ch...> - 2012-06-18 21:24:26
|
On Jun 18, 2012, at 4:13 PM, Robert Munafo wrote: > I have Xcode 3.2.6 on both of my Snow Leopard machines, but I'll need > instructions on how to create the project and where to put the missing > main() routine, and/or how to compile it from the command line with > /usr/bin/xcodebuild. > > I tried making a new project from templates "Cocoa Application" and > "Quick Look Plug-In", but your code doesn't seem to fit into either of > those. > > (Anyone else aside from Charles, feel free to clue me in. I don't mind > looking foolish :-) You just paste it into the Document-Based Application template. Then, you put an NSImageView in the .xib file and bind it to the “image” property on File’s Owner, and put in a button, menu item, whatever you please, and bind it to -convertToTIFF: either on File’s Owner or on First Responder. However, the snippet I posted was ARC, which Xcode 3 doesn’t support, so you’ll want to stick a release after assigning self.image, in order to avoid a memory leak. I should have thought of that, since you already mentioned you were on Snow Leopard. Sorry about that. I can just send you a binary if you want; send me a message off-list if you want me to. Charles |