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

Can't set image in NSImageView


  • Subject: Can't set image in NSImageView
  • From: email@hidden
  • Date: Fri, 6 Feb 2004 23:59:50 EST

I have the following routine in my app that exicutes when a button is clicked.
_______________________________________________

- (IBAction)mystart:(id)sender
{
// [statusImage setImage:@"onstate.png"]; // doesn't work

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

[actionButton setTitle:@"Stop"];
[actionButton setAction:@selector(mystop:)];
}
_______________________________________________

When the button is clicked, it doesn't change the image and gives the
following errer.

2004-02-06 23:50:05.953 XSKeyEMU[21019] NSImageCell's object value must be an
NSImage.
_______________________________________________

I have looked at the information on NSImageView's "setImage"
setImage:

- (void)setImage:(NSImage *)image

Lets you specify the image the receiver displays.

See Also: - image
_______________________________________________

and it doesn't say much about it, any ideas what the problem is and a
solution?
_______________________________________________

Dale
_______________________________________________
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: "M. Uli Kusterer" <email@hidden>
    • Re: Can't set image in NSImageView
      • From: Jens Bauer <email@hidden>
    • Re: Can't set image in NSImageView
      • From: Fritz Anderson <email@hidden>
    • Re: Can't set image in NSImageView
      • From: Steve Bird <email@hidden>
    • Re: Can't set image in NSImageView
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: NSColor Deadlock bug?
  • Next by Date: Re: Cocoa/Windows parallel dvlpmt
  • Previous by thread: Re: NSColor Deadlock bug?
  • Next by thread: Re: Can't set image in NSImageView
  • Index(es):
    • Date
    • Thread