Hi !!!
I try to catch the pressed event button in NSAlert. I use beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ but i have error:
on alertFunction()
set alert to NSAlert's alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_("text", "OK", "Chose", "Cancel", "text2")
alert's setAlertStyle_(2)
alert's setIcon_(NSImage's imageNamed_("Finder"))
alert's beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(alert's mainWindow, me, "alertDidEnd_returnCode_contextInfo_", missing value)
set theResponse to alert's runModal()
end alertFunction
on alertDidEnd_returnCode_contextInfo_(theAlert, returnCode, contextInfo)
log sender
end alertDidEnd_returnCode_contextInfo_
So, what i have to write as first argument in beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ ??