AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_DefineProperties (Function)
Summary:     Creates one or more properties for an object.
Syntax:
JSBool JS_DefineProperties(JSContext *cx, JSObject *obj,
JSPropertySpec *ps);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     obj     JSObject *     Object for which to create new properties.
                 
     ps     JSPropertySpec *     Pointer to an array containing names, ids, flags, and getProperty and setProperty method for the properties to create. The last array element must contain zero-valued members.
                 
Description:
JS_DefineProperties creates one or more properties in a specified object, obj

ps is a pointer to the first element of an array of JSPropertySpec structures. Each array element defines a single property: its name, id, flags, and getProperty and setProperty methods. The name field of the last array element must contain zero-valued members. JS_DefineProperties creates one property for each element in the array with a non-zero name field.

If successful, JS_DefineProperties returns JS_TRUE, indicating it has created all properties listed in the array. Otherwise it returns JS_FALSE.


See also:
JSPropertySpec
JS_DefineConstDoubles
JS_DefineElement
JS_DefineFunction
JS_DefineFunctions
JS_DefineObject
JS_DefineProperty
JS_DefinePropertyWithTinyId

[sh-index] Back to list of manuals