Skip to main content
Version: 8.3 Beta 🚧

system.vision.getSibling

Backwards Compatibility

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.

note

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​

TypeParameterDescription
EventObjecteventA component event object.
StringnameThe name of the sibling component.

Returns​

VisionComponent - Returns reference to the sibling component. See VisionComponent.

Scope​

Vision Client

Code Examples​

Example #1
# 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)