31
edits
| Line 8: | Line 8: | ||
= 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}}. | ||
The ideal solution is to allow Gecko applications to dynamically register for Applescript commands which are then forwarded to them, without the caller needing to write their own Objective-C. | |||
e.g. if Firefox Sync would like to have an Applescript command "tell application "Firefox" to sync", it could register with the Applescript service to forward all "sync" Applescript requests to their Javascript code. | |||
'''Discussed Options''' | '''Discussed Options''' | ||
| Line 15: | Line 19: | ||
**Pros: native Obj-C solution, less chance of problems interacting with Apple's code | **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) | **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 | *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 | **Pros: can be maintained at the Gecko-level, allows developers with no knowledge of Obj-C to provide functionality to Applescript | ||
| Line 21: | Line 26: | ||
'''Other Options''' | '''Other Options''' | ||
*Override [NSScriptCommand executeCommand] | *Override [NSScriptCommand executeCommand] and do our own parsing and handling of Applescript commands. | ||
'''Scripting Hierarchy''' | |||
Gecko | |||
*application | |||
**windows | |||
***current tab? | |||
***tabs? | |||
Firefox | Firefox | ||
edits