It looks like the issue may be the [img drawInRect:NSMakeRect(x,y,xb,yb) fromRect:NSMakeRect(0,0,0,0) operation:NSCompositeCopy fraction:1];
should be [img drawInRect:NSMakeRect(x,y,xb,yb) fromRect:NSMakeRect(0,0,0,0) operation:NSCompositeSourceOver fraction:1]; I'm trying to check that some images are there but Xcode keeps crashing when I try to access the data model, any version, in either 4.5 or 3.2 I get the following error Uncaught Exception: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array Stack Backtrace: The stack backtrace has been logged to the console. The app was originally written in Xcode 3.2 on OS10.5 Many Thanks Amy On 5 Jan 2013, at 11:48AM, Ken Thomases <k...@codeweavers.com> wrote: > On Jan 5, 2013, at 2:44 AM, Amy Gibbs wrote: > >> i've got a section of code that worked perfectly in 10.5. It doesn't in 10.8 >> and I can't see why. It's not too complicated, it basically takes a >> selection of images and combines them into a single image and saves it to a >> couple of locations. Can anyone point out the problem to me please? > > The code snippet is hard to interpret because it's apparently incomplete. > For example, there are mismatched braces, etc. > > It also seems like you lock focus on the image multiple times but only unlock > it once. > > In any case, you should always read the release notes for the frameworks. > Especially when it comes to image manipulation, you should read the Snow > Leopard AppKit release notes. They are really illuminating. > https://developer.apple.com/library/mac/releasenotes/Cocoa/AppKitOlderNotes.html#X10_6Notes > (search for "impedance matching" and keep reading through all of the NSImage > and NSBitmapImageRep sections) > > Regards, > Ken > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com