• 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: Can't set image in NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't set image in NSImageView


  • Subject: Re: Can't set image in NSImageView
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Sat, 7 Feb 2004 15:36:46 +0100

At 23:59 Uhr -0500 06.02.2004, email@hidden wrote:
// [statusImage setImage:@"onstate.png"]; // doesn't work

NSString *myImage;
myImage = @"onstate.png";
[statusImage setImage:(NSImage *)myImage];

Seeing you try this, I think assigning an image to an object isn't really your problem. Your problem is that you need to learn Objective C first. Without that knowledge, there's not much point in trying to typecast your way around.

A very good book is "Cocoa Programming for MacOS X" by Aaron Hillegass. Buy it. It's worth the price. The author is a seasoned instructor, and if you're a quick reader, you can use it to pick up Cocoa programming in a weekend. (worked for me, and I'm not a rocket scientist)

What this book doesn't cover, you can get from Apple's Objective C book. to which someone else posted a link already. It's pretty drily written, but the definitive reference if you have any questions about what a certain piece of ObjC code does.

Oh, and of course if you have questions, there's always the FAQ:

<http://www.alastairs-place.net/cocoa/faq.txt>
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Can't set image in NSImageView
      • From: lbland <email@hidden>
References: 
 >Can't set image in NSImageView (From: email@hidden)

  • Prev by Date: BigSQL Xcode and IB
  • Next by Date: Re: Can't set image in NSImageView
  • Previous by thread: Re: Can't set image in NSImageView
  • Next by thread: Re: Can't set image in NSImageView
  • Index(es):
    • Date
    • Thread