Ignore:
Timestamp:
Nov 4, 2009 10:40:54 AM (15 years ago)
Author:
dkearney
Message:

updates and adding example code to python and tcl apis

Location:
trunk/examples/objects/api
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/objects/api/python/library

    r1586 r1610  
    77methods
    88    lib.loadXml(xmltext)
    9 
    109    lib.loadFile(filename)
    11 
    12 
    1310    lib.value(key[, ...])
    14 
    1511    lib.diff(lib2)
    16 
    1712    lib.remove(key)
    18 
    1913    lib.xml()
    20 
    2114    lib.outcome()
    2215    lib.error()
    23 
    24     lib.result(int status)
    25 
     16    lib.result(status)
    2617    lib.contains()
    2718
     
    113104    Code Example:
    114105
    115 int error()
     106lib.error()
    116107    Purpose: return the status of the object
    117108    Input Arguments: 0
  • trunk/examples/objects/api/python/number

    r1586 r1610  
    44    Rappture.Number()
    55    Rappture.Number(name, units, val[, min, max, label, desc])
    6     Rappture.Number(const Number& o)
     6    Rappture.Number(numObj)
    77
    88methods
     
    2020    n.property(key[, val])
    2121    n.propremove(key)
    22 
    2322    n.convert(to)
    2423    n.value(units)
     
    2625    n.random()
    2726    n.diff(o)
    28 
    2927    n.addPreset(label, desc, val[, units])
    3028    n.delPreset(label)
    31 
    3229    n.configure(as, c)
    3330    n.dump(as, c)
    34 
    3531    n.outcome()
    36 
    3732    n.is()
    3833
     
    5247    Code Example:
    5348
    54 Rappture.Number(o)
    55     Purpose: construct a number object based on number object o
    56     Input Arguments: 1
    57         1. o - number object to copy
     49Rappture.Number(numObj)
     50    Purpose: construct a number object based on number object numObj
     51    Input Arguments: 1
     52        1. numObj - number object to copy
    5853    Return Value: a newly created number object
    5954    Notes: None
     
    9691    Purpose: get/set the description of the object
    9792    Input Arguments: at most 1
    98         1. const char *val - new description
     93        1. val - new description
    9994    Return Value: description of the object
    10095    Notes: if no description is set, None will be returned
     
    118113    Purpose: get/set the color of the object
    119114    Input Arguments: at most 1
    120         1. const char *val - new color
     115        1. val - new color
    121116    Return Value: color of the object
    122117    Notes: if no color is set, None will be returned
     
    164159    Purpose: get/set the units of this object
    165160    Input Arguments: 1
    166         1. const char *val - new units
     161        1. val - new units
    167162    Return Value: the string representing the object's units
    168163    Notes: if no units are set, None will be returned
     
    173168    Purpose: get/set a generic property in the property database
    174169    Input Arguments: at most 2
    175         1. const char *key - property name
    176         2. const void *val - property value
     170        1. key - property name
     171        2. val - property value
    177172    Return Value: value of the property
    178173    Notes: A copy val is stored in the property database
     
    252247    Purpose: delete the preset labeled "label" from this object
    253248    Input Arguments: 1
    254         1. const char *label - label of the preset
     249        1. label - label of the preset
    255250    Return Value: None
    256251    Notes: preset is removed from the object
  • trunk/examples/objects/api/python/plot

    r1586 r1610  
    1919    p.curve(name)
    2020    p.getNthCurve(n)
    21 
    2221    p.vvalue([...])
    2322    p.random()
    2423    p.diff(o)
    25 
    2624    p.configure(as, c)
    2725    p.dump(as, c)
    28 
    2926    p.outcome()
    30 
    3127    p.is()
    3228
     
    8480    Purpose: get/set the description of the object
    8581    Input Arguments: at most 1
    86         1. const char *val - new description
     82        1. val - new description
    8783    Return Value: description of the object
    8884    Notes: if no description is set, None will be returned
     
    106102    Purpose: get/set the color of the object
    107103    Input Arguments: at most 1
    108         1. const char *val - new color
     104        1. val - new color
    109105    Return Value: color of the object
    110106    Notes: if no color is set, None will be returned
     
    116112    Purpose: get/set a generic property in the property database
    117113    Input Arguments: at most 2
    118         1. const char *key - property name
    119         2. const void *val - property value
     114        1. key - property name
     115        2. val - property value
    120116    Return Value: value of the property
    121117    Notes: A copy val is stored in the property database
Note: See TracChangeset for help on using the changeset viewer.