load image

Hi,

How can i load image in image well by clicking button???

pls help

Hi,

connect the push action to the button and the image well to the property in Interface Builder.
Pressing the button displays the “Advanced” system image in the image well.
imageNamed can be used for all system images defined in NSImage and the files in the main bundle of the application

property imageWell : missing value

on push_(sender)
		set newImage to current application's NSImage's imageNamed_(current application's NSImageNameAdvanced)
        imageWell's setImage_(newImage)
end push_	

thank you stefan,

i am sorry but i am new to this platform and its confusing for me. i explain my situation again:

in main window i have one button by name of “image” and one image well. i have one image in my application bundle. i want to load that image in image well by clicking the button.

can you pls help in this matter.

In Stefan’s example he already declared an IBAction (a void function that will be recognized by IB as an action). So the only thing you need to do is go to interface builder, then click connection in the inspector and connect the push handler with the button.

Seeing how many questions you have you may consider to buy Shane’s book. It will answer questions much faster for a few bucks.

thanks stefan,

its done. i have changed image name and it got fixed…

thanks a ton