Bases: openalea.grapheditor.observer.Observed, openalea.grapheditor.observer.AbstractListener
>>> from openalea.core.control.manager import ControlContainer
Convenience method to create a control and add it to container. See Control.
>>> container = ControlContainer()
>>> container.add('i', interface='IInt', value=1)
Control('i', IInt, value=1)
Parameters: |
|
---|
Like namespace() but dictionnary contains only controls with value different than default value.
Return all control with name "name". If no control found, returns None, if only one found, returns it else return a list of control.
If uid is passed, returns corresponding control or None if not found. If uid is passed, it never returns a list as uid is unique.
Returns namespace (dict control name -> value). :param tag: returns namespace corresponding to given tag.
Default, returns global namespace
Update controls with dict values. If a name is not referenced in ControlContainer, nothing is done.
Note
Example:
Let "container" a Container with one control "a" with value 1:
container:
- a:IInt = 1
after container.update({'a':2, 'b':3}) we get
- container:
- a:IInt = 2
Parameters: | dic -- dict name -> value |
---|