Changes between Version 10 and Version 11 of SCRIPTING_ACTIONS_API_R0


Ignore:
Timestamp:
07/16/09 10:25:17 (16 years ago)
Author:
mitex
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SCRIPTING_ACTIONS_API_R0

    v10 v11  
    106106  * Class {{{JSBook}}} extends {{{ScriptableObject}}} 
    107107   * Override {{{getClassName}}} to return "Book". That means that script writers will use "Book" instead of "JSBook". 
    108    * Create getters and setters according to the analysis. 
     108   * Create a method {{{void setBook(ResourceRef book)}}} which sets the "real" book that is adapted. 
     109   * Create getters, setters and other methods according to the analysis. 
    109110    * For example, for the title write {{{String jsGet_title()}}} and {{{void jsSet_title(String title)}}}. This will allow users to benefit from the easy JavaScript syntax: "book.title = 'Design Patterns'". 
    110111  * Class {{{JSPage}}} extends {{{ScriptableObject}}} 
     
    118119   * Use {{{ScriptableObject.defineClass(scope, JSBook.class);}}} to expose a given {{{ScriptableObject}}} to JavaScript. 
    119120   * When executing a script from a document window, expose all adapter and facade classes. When the script is used as a link action, do not expose {{{JSApp}}}. 
    120    * Use 
     121   * Use the following to expose a global variable {{{book}}} which represents the book where the script is created: 
    121122{{{ 
    122123Scriptable scriptableJsBook = context.newObject(scope, "Book"); 
     
    125126jsBook.setBook(bookRef); 
    126127}}} 
    127     to expose a global variable {{{book}}} which represents the book where the script is created. 
    128128   * Expose the app too, if running a script from a document window. 
    129129   * Limit the scope of visible Java classes to only Rhino classes using {{{context.setClassShutter}}}.