Yeah, I think I will switch to ... pathForResource:ofType: ....

I did read the bit about Window Server and NSImage ...

On Feb 8, 2009, at 5:11 PM, Stephen J. Butler wrote:

On Sun, Feb 8, 2009 at 5:40 PM, David Blanton <aired...@tularosa.net> wrote:
Kyle and Stephen ... great comments

      - so there are  three ways to get the image file

what criteria should I use in deciding which to use ?

I think it's mostly preference. My impression is that most experienced
Cocoa developers would say your original way of getting the path
should be replaced with pathForResource:ofType:. However, there's no
general advantage to using NSImage over CGImage, or vice versa. Both
are accepted/correct.

One thing to watch out for -- and it's generated some traffic on this
list recently -- is that NSImage creates hidden windows to manage
resources. So if you're loading many, many, many images, NSImage can
lockup the Window Server.

But other than that, just go with whatever is easier or you have examples for.
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/airedale%40tularosa.net

This email sent to aired...@tularosa.net




_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to