• 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
displaying a NSImage within NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

displaying a NSImage within NSImageView


  • Subject: displaying a NSImage within NSImageView
  • From: "Daniel O'Sullivan" <email@hidden>
  • Date: Tue, 05 Apr 2005 16:06:38 +0000

Hello,

I'm currently trying to display a NSImage . The problem is that no image appears within the NSImageView. I'm sure the classes are linked correctly within in the Interface builder and know that a NSImage is returned correctly. The code i have is as follows.

//here i pass the name of a ppm file that is converted into a NSImage called 'theImage' which is then passed directly into setImage method

NSImage *theImage = [jtPPMToImageRep imageRepFromFile: aFormattedString];

[view setImage:theImage];

//please understand i'm new to cocoa, but line of code above should display the image with the NSImageView, view is also declared within the header 'IBOutlet NSImageView *view;'

Otherwise could anybody point out to me where i've gone wrong that and how i get an image to appear within the NSImageView.

Or is there another method that can display the image, either way i would really appreciate some advice on how to get an image to appear! Please!!! Perhaps there's some online tutorials on how to do this that somebody knows of, unfortunately i've been unable to locate any!

cheers for any help and taking the time to read this - my university degree currently hangs on this!!!!!

Dan

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: displaying a NSImage within NSImageView
      • From: Shawn Erickson <email@hidden>
References: 
 >Re: Knowing if a view is first responder (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: PreferencePane plugin: awakeFromNib gets called twice
  • Next by Date: Re: how input method editors work
  • Previous by thread: Re: Knowing if a view is first responder
  • Next by thread: Re: displaying a NSImage within NSImageView
  • Index(es):
    • Date
    • Thread