• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: passing argument 1 of 'setContents:' from incompatible pointer type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing argument 1 of 'setContents:' from incompatible pointer type


  • Subject: Re: passing argument 1 of 'setContents:' from incompatible pointer type
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Sun, 8 Feb 2009 18:11:45 -0600

On Sun, Feb 8, 2009 at 5:40 PM, David Blanton <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: passing argument 1 of 'setContents:' from incompatible pointer type
      • From: Michael Ash <email@hidden>
    • Re: passing argument 1 of 'setContents:' from incompatible pointer type
      • From: David Blanton <email@hidden>
References: 
 >passing argument 1 of 'setContents:' from incompatible pointer type (From: David Blanton <email@hidden>)
 >Re: passing argument 1 of 'setContents:' from incompatible pointer type (From: "Stephen J. Butler" <email@hidden>)
 >Re: passing argument 1 of 'setContents:' from incompatible pointer type (From: Kyle Sluder <email@hidden>)
 >Re: passing argument 1 of 'setContents:' from incompatible pointer type (From: David Blanton <email@hidden>)

  • Prev by Date: Re: passing argument 1 of 'setContents:' from incompatible pointer type
  • Next by Date: Re: passing argument 1 of 'setContents:' from incompatible pointer type
  • Previous by thread: Re: passing argument 1 of 'setContents:' from incompatible pointer type
  • Next by thread: Re: passing argument 1 of 'setContents:' from incompatible pointer type
  • Index(es):
    • Date
    • Thread