I have an Applescript Studio Xcode project that has a main window with a few buttons on it, when I click one of the buttons a panel appears (not attached to main window) which has buttons on it that when clicked do their thing, the problem i’m trying to figure out is, with the panel still open how can I click on the other buttons on the main window and have them perform their assigned tasks? , at the moment I have to close the panel to use the main window buttons, any ideas please?
OSX 10.4.11, Xcode 2.5
Your probably using
display panel window “Your Panel’s Name” which does the following according to Xcode’s Documentation:
This method runs a modal event loop for the specified window synchronously. It displays the specified window, makes it key, starts the run loop, and processes events for that window. (You do not need to show the window yourself.)
It also does not perform any tasks (such as firing timers) that are not associated with the modal run loop. In other words, this method consumes only enough CPU time to process events and dispatch them to the action methods associated with the modal window. While the application is in that loop, it does not respond to any other events (including mouse, keyboard, or window-close events) unless they are associated with the window.
You can exit the modal loop by calling the stopModal, stopModalWithCode:, or abortModal methods from your modal window code. If you use the stopModalWithCode: method to stop the modal event loop, this method returns the argument passed to stopModalWithCode:. If you use stopModal instead, this method returns the constant NSRunStoppedResponse. If you use abortModal, this method returns the constant NSRunAbortedResponse.
So the bold, underlined line says that only the panel can receive mouse, keyboard or window-close events.
To just show the panel regularly as if it was a normal window, use:
show window "Your Panel's Name"
Hope it helps,
great stuff ief2, appreciate the help