Mac:AppleScript: Difference between revisions

no edit summary
(Created page with "Right now Gecko is only able to respond to the relevant parts of the standard AppleScript dictionary. We'd like to expand support to allow for more complex interactions. In parti...")
 
No edit summary
Line 1: Line 1:
Right now Gecko is only able to respond to the relevant parts of the standard AppleScript dictionary. We'd like to expand support to allow for more complex interactions. In particular, we want to resolve the following bugs in Firefox:
Right now Gecko is only able to respond to the relevant parts of the standard AppleScript dictionary. We'd like to expand support to allow for more complex interactions. In particular, we want to resolve the following bugs in Firefox:  


* {{nbug|369901}}, {{nbug|516502}}, get URLs and titles for tabs
*{{nbug|369901}}, {{nbug|516502}}, get URLs and titles for tabs  
* {{nbug|490830}}, get contents of selection
*{{nbug|490830}}, get contents of selection  
* {{nbug|395712}}, make a new browser window
*{{nbug|395712}}, make a new browser window  
* {{nbug|395711}}, make a new tab
*{{nbug|395711}}, make a new tab


= Current Plan =
= Current Plan =


The bug for improved AppleScript support in Gecko is {{bug|61356}}.
The bug for improved AppleScript support in Gecko is {{bug|61356}}.  
 
== Discussed Options ==
 
*Proxy objects: similar to Tom Dyas' work in {{bug|516502}}, have an application create their own set of proxy Obj-C classes to respond to Applescript.
**Pros: native Obj-C solution, less chance of problems interacting with Apple's code
**Cons: must regularly update proxy objects, may not represent actual state of application. Also, much be maintained on a per-application basis (not within Gecko)
*Catching requests: override KVC and preformSelector on NSApplication subclass to catch requests from Applescript and forward requests to other classes that register with an Applescript service
**Pros: can be maintained at the Gecko-level, allows developers with no knowledge of Obj-C to provide functionality to Applescript
**Cons: could have performance implications (given changes to NSApplication), greater chance of problems interacting with Apple's code
 
== Plan ==


The plan is...
The plan is...
31

edits