system.vision.getSibling
This function replaces system.gui.getSibling. Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. Only the system.vision variations will appear in the Script Editor's autocomplete popup.
This function is used in Python Scripting.
Description​
Given a component event object, looks up a sibling component. Shortcut for event.source.parent.getComponent("siblingName"). If no such sibling is found, the special value None is returned.
This function is available on secondary desktops via the system.vision.desktop function. See the Multi-Monitor Clients page for more details on secondary desktops.
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.vision.getSibling(event, name)
Parameters​
Type | Parameter | Description |
---|---|---|
EventObject | event | A component event object. |
String | name | The name of the sibling component. |
Returns​
VisionComponent - Returns reference to the sibling component. See VisionComponent.
Scope​
Vision Client
Code Examples​
# This example gets its sibling Text Field's text, and uses it.
textField = system.vision.getSibling(event, 'TextField (1)')
if textField is None:
system.vision.showError("There is no text field!")
else:
system.vision.showMessage("You typed: %s" % textField.text)