|
|||||||||||||||||||||||||||||||||||||||||||||
AppleEvent to JavaScript Value ConversionThe MacOS.AEApp, MacOS.AEClass and MacOS.AEColl objects perform JavaScript to AppleEvent conversions when sending AppleEvents to another Macintosh Application. AppleEvent to JavaScript conversions are performed on the result of an AppleEvent. JavaScript To AppleEvent Value Conversions
AppleEvent To JavaScript Value ConversionsAppleEvents have a greater number of ways of expressing values than does JavaScript. Because of this, JavaScript OSA AppleEvent to JavaScript conversion process maps several AppleEvent data types onto a single JavaScript data type.
JavaScript Object/AppleEvent Record ConversionsAn AppleEvent record is a collection of properties, much as a JavaScript Object is. The difference is that there may be two kinds of property in an AppleEvent record: keyed properties and user properties. A keyed property is identified by a unique 4-character key that usually maps to a property definition in an application dictionary. If the AppleEvent/JavaScript conversion is performed by a method or property of the MacOS.AEApp, MacOS.AEClass or MacOS.AEColl objects, keyed properties in JavaScript may be referred to using the name defined for the key in the target application's dictionary. If the conversion is happening in any other context, the JavaScript name given to the property is "ae_xxxx" where xxxx is the property's four-character. NOTE: if a property key contains characters that cannot appear in a JavaScript identifier, use JavaScript's array syntax to access the property (e.g.: aVar["ae_----"]). A user property is a named property where the name is an arbitrary string of any length (there is a generally accepted 255 character limit). User properties map directly to properties of JavaScript objects. |
|||||||||||||||||||||||||||||||||||||||||||||