As you know, with Studio, you have such AppleScript Handlers as:
on should close theObject(= a window)
on should quit theObject(= app)
on update toolbar item
on choose menu item, etc.
My Studio app opens an Excel spreadsheet and via applescript manipulates the contents of all the cells.
Works just dandy so long as I open only one Excel doc at a time … but when I tried to open more than one Excel doc simultaneously, Studio bogged down big time because AppleScript is not multi-threaded in nature … in short, nothing happened on the 2nd Excel doc until all the calculations on the 1st doc were completed. In fact, I could not even choose another menu item within the Studio app until these 1st calculations completed because AppleScript is essentially linear in nature. To be more precise, my Studio App window opens a spreadsheet and then starts the cell content manipulation … my Studio App’s File Menu title stays highlighted until all these Excel cells are calculated.
The thought of starting over using Objective-C not only gives me a gigantic headache, but I’m not sure it would do me any good … because what I essentially want is the ability to hand over control from the primary Studio App (the one with the on launch, on should close etc. Handlers) to a 2nd Studio module that assumes control of manipulating the Excel spreadsheet. This way, my Studio App’s File Menu title is un-highlighted and is released for further independent duty. I call the 2nd Studio whatever a module, rather than an application because an application has the on should close, on should quit etc. Handlers.
And another question pops up, namely, how to pass parameters to the 2nd module?
Thanks as always …