Hide/Show Image programmaticaly

I would like to hide an image when my app starts and display it if a certain condition evaluates to true.

I dragged a NSImageView Object and connected it in the Interface builder to a property called aFlag

script AppDelegate
    property parent : class "NSObject"
    property aWindow : missing value
    property aFlag : missing value

on awakeFromNib()
        set visible of aFlag to false
end awakeFromNib
end script

This doesn’t seem right and doesn’t work obviously. How can I hide/show an image?

There is no visible property of an image view, you want setHidden_(1) to make it invisible and setHidden_(0) to make it reappear.

Ric