Re: Managing image loading

2014-02-11 Thread Leonardo
and create the image. It sounds linear and clean. Good luck to myself. I'll let you know. Regards -- Leonardo Da: Jens Alfke j...@mooseyard.com Data: Sat, 8 Feb 2014 16:37:01 -0800 A: Leonardo mac.iphone@gmail.com Cc: cocoa-dev@lists.apple.com Oggetto: Re: Managing image loading

Re: Managing image loading

2014-02-08 Thread Leonardo
-dev@lists.apple.com Oggetto: Re: Managing image loading On Feb 4, 2014, at 9:03 AM, Leonardo mac.iphone@gmail.com wrote: - When the user imports a new image, I add its NSData to the NSFileWrapper [docFileWrapper addRegularFileWithContents:imgData preferredFilename:@image.png

Re: Managing image loading

2014-02-08 Thread Kyle Sluder
On Feb 8, 2014, at 3:58 AM, Leonardo mac.iphone@gmail.com wrote: I had to scratch my head at managing the undo, but I found a solution here too. When the user undo the import of an image, if the images has been never saved, so it is still within the temporary folder, I just remove the

Re: Managing image loading

2014-02-08 Thread Jens Alfke
On Feb 8, 2014, at 3:58 AM, Leonardo mac.iphone@gmail.com wrote: When the user imports a new image, I quickly copy the image to a temporary folder, then I add this latest file reference to the document’s NSFileWrapper. I just create the file’s fileWrapper using its URL, so I do not read

Managing image loading

2014-02-04 Thread Leonardo
My app displays several images on several pages. Since the app displays one page per time, I would like to optimize the memory management at loading and displaying the images. I thought to save my document as filePackage, put the image files within the package and use the lazy image =

Re: Managing image loading

2014-02-04 Thread Jens Alfke
On Feb 4, 2014, at 3:05 AM, Leonardo mac.iphone@gmail.com wrote: My app displays several images on several pages. Since the app displays one page per time, I would like to optimize the memory management at loading and displaying the images. It'd be best to explicitly release/free the

Re: Managing image loading

2014-02-04 Thread Leonardo
all of that sound good? Regards -- Leonardo Da: Jens Alfke j...@mooseyard.com Data: Tue, 4 Feb 2014 07:41:41 -0800 A: Leonardo mac.iphone@gmail.com Cc: cocoa-dev@lists.apple.com Oggetto: Re: Managing image loading On Feb 4, 2014, at 3:05 AM, Leonardo mac.iphone@gmail.com wrote: My app

Re: Managing image loading

2014-02-04 Thread Jens Alfke
On Feb 4, 2014, at 9:03 AM, Leonardo mac.iphone@gmail.com wrote: - When the user imports a new image, I add its NSData to the NSFileWrapper [docFileWrapper addRegularFileWithContents:imgData preferredFilename:@image.png]; and retain the NSImage. So I can draw the NSImage at any