Probably this is another stupid question, but there so many things new, different and whatever while I’m trying to convert/merge my old ASS apps and replacing Satimage at a time.
In the old ASS days I could write:
set res to display panel window “somePanel”
and a “panel script” (which was valid for several panels)
on clicked theObject
set objName to name of theObject
if objName = “cancel” then
close panel window of theObject with result 0
else if objName = “okay” then
close panel window of theObject with result 1
…
else if objName = “newSettings” then
close panel window of theObject with result x
end if
end clicked
More like an alert.
An example: Lets say I have some code running collecting some values. At a certain state a panel window should be displayed - the code execution is “put on hold”.
Like with an alert there are some buttons, unlike with the alert there could be popups or lists, checkboxes.
After that the code should proceed with the selected value(s).
That’s either an NSPanel or NSWindow, depending on what layer you want it to appear on, shown modally, using NSApplication’s runModalForWindow:. You end the display by calling stopModalWithCode: or abortModal within the window’s buttons’ action handlers.