Developer Question: NS ImageView

Jump to First Reply
Posted:
in macOS edited January 2014
Since there doesn't seem to be a dev forum here, I thought i'd post it in Mac OS X since thats what I'm developing in, .



Right, im quite a Interface Builder newb and am wondering this...



I have a custom view, I then change its class in IB to NS ImageView.



Then I got stuck, how do I insert an image in NS ImageView.

I am using Applescript to develop the app.



Thanks

Comments

  • Reply 1 of 5
    I'm not really certain I can answer your question, but until someone else replies, this may inspire something:



    In cocoa, you need an NSImage and then you can set that into an NSImageView with:



    [NSImageView setImage:NSImage]
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 5
    nebagakidnebagakid Posts: 2,692member
    set the contents of image view "NAME OF MY IMAGE VIEW" to "NAME OF PICTUER FILE IN MY RESOURCES!"
     0Likes 0Dislikes 0Informatives
  • Reply 3 of 5
    airslufairsluf Posts: 1,861member
     0Likes 0Dislikes 0Informatives
  • Reply 4 of 5
    nebagakid, I added your code to a Applescript file and connected the applescript file to the NS ImageView. But it doesn't seem to want to work.



    Right now all I have done is tick the appropriate Applescript, is there anything else I should do?
     0Likes 0Dislikes 0Informatives
  • Reply 5 of 5
    And ofcourse I changed the attributes on the script =-)
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.