I have an open dialog that works fine, but in my terminal daftness I don’t seem to be able to get when the user has canceled.
That’s not much to go on – can you post some code?
Hi Shane
I open a panel (not IB)
set FILE_PATH to POSIX path of (((current application's class "NSBundle"'s mainBundle()'s resourcePath()) as string) & "/lists/")
tell class "NSOpenPanel" of current application to set myOpenPanel to its openPanel
myOpenPanel's setDirectoryURL_(FILE_PATH)
myOpenPanel's setPrompt_("Remove")
myOpenPanel's setAllowsMultipleSelection_(true)
myOpenPanel's setCanChooseFiles_(true)
myOpenPanel's setCanChooseDirectories_(true)
myOpenPanel's runModal
set tFileArray to (myOpenPanel's filenames()) as list
then I want to check to see if OK (Remove) or Cancel has been clicked before I do stuff
Everything works without the checking for cancel, but I don’t seem to be able to get which button is clicked.
The runModal: method will return 1 if OK was clicked and 0 if Cancel was clicked.
if (myOpenPanel's runModal) then
duh! some of this stuff is too easy.
Thanks yet again Shane!