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

updates and adding example code to python and tcl apis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.