• 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: [NEWB] Filling a rect with an Image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NEWB] Filling a rect with an Image


  • Subject: Re: [NEWB] Filling a rect with an Image
  • From: "Kyle Sluder" <email@hidden>
  • Date: Wed, 6 Aug 2008 11:58:20 -0400

On Wed, Aug 6, 2008 at 11:50 AM, Brad Gibbs <email@hidden> wrote:
>  I've added a .png named ScrollBackground to my Resources folder.  The code
> compiles but I get a warning: "NSImage may not respond to '-setImage'.

That would be because, indeed, NSImage does not respond to -setImage.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html

> How can I make this right?

Use the +[NSImage imageNamed:] convenience constructor.  You're best
off doing this once and stuffing it in an ivar; just remember to
retain it.

--Kyle Sluder
_______________________________________________

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: [NEWB] Filling a rect with an Image
      • From: Brad Gibbs <email@hidden>
References: 
 >[NEWB] Filling a rect with an Image (From: Brad Gibbs <email@hidden>)

  • Prev by Date: [NEWB] Filling a rect with an Image
  • Next by Date: Re: [NEWB] Filling a rect with an Image
  • Previous by thread: [NEWB] Filling a rect with an Image
  • Next by thread: Re: [NEWB] Filling a rect with an Image
  • Index(es):
    • Date
    • Thread