07
Jun

For identifying which button the user clicked (Open or Cancel), you need to check if the value of
[urPanel runModal] is equal to the constant value NSOKButton (representing Open button) or NSCancelButton (representing Cancel button), like this,

if ([urPanel runModal] == NSOKButton) {
// User Clicked Open/OK Button!
}

Here urPanel is your NSOpenPanel.

, , , , ,

shinu.s
Posted by on 07 Jun 2011 by shinu.s in Apple MAC, Cocoa, iPhone, Mac OS X, Objective C

Add reply

*