Hello All
Could somebody explain what serves these options, of the AppleScript Inspector panel window in Interface Builder, and how to use them?
Image of AppleScript scope options
Thanks
From the AppleScript Studio release notes :
Scripts can now be designated to have global, per nib, or per object scope. When attaching scripts and event handlers to objects in the AppleScript inspector in Interface Builder, you can choose the scope of the script using the new Scope popup button in the inspector. When the nib is loaded in your project, the scope will determine how the script is attached. If you designate a script as global, then there will be only one instance of the named script while your application is running. If you choose per nib, every time the nib is loaded a new instance of the script is attached to the specified objects in that nib. If the scope is set to per object, then every designated object gets a new instance of the script.
This provides a more object oriented approach to structuring your application. For instance, in a document based application you could have a Document.applescript file, and when you attach any scripts to the objects in your Document.nib, specify the scope of the scripts in the nib to be per nib. Then every time a new document is created you get a new instance of the Document script. In doing this you can have properties or globals defined in the script that are specific to that instance of the document. In previous versions, any properties or globals defined in a script would be shared by every document.
The new script scopes only work on Mac OS X 10.4 Tiger or later. Therefore, if you want to select per nib or per object scope for a script, you must switch your nibโs Oldest Target setting to Mac OS X Version 10.4.
Itโs probably not useful if youโre not using multiple instances of nibs or objects.
Thank you Bruce for this information, it is indeed very clear. There is also other useful information in this Release Note, very interesting, still thank you