Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

This is an advanced scripting function. Invokes (calls) the given Python function object after all of the currently processing and pending events are done being processed, or after a specified delay. The function will be executed on the GUI, or event dispatch, thread. This is useful for events like propertyChange events, where the script is called before any bindings are evaluated. 

 If you specify an optional time argument (number of milliseconds), the function will be invoked after all currently processing and pending events are processed plus the duration of that time.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.invokeLater(function [, delay])

  • Parameters

PyObject function - A Python function object that will be invoked later, on the GUI, or event-dispatch, thread with no arguments.

int delay - A delay, in milliseconds, to wait before the function is invoked. The default is 0, which means it will be invoked after all currently pending events are processed. [optional]

  • Returns

nothing

  • Scope

Vision Client

Code Examples
Code Snippet
# The code in the update/refresh button uses the 'date' property on the two 
# calendar components, which are bound to the current_timestamp property on their 
# parent. We want to simulate a button press when the window opens, but only 
# after the date properties' bindings have been evaluated.
 
if event.propertyName == 'current_timestamp':
   # Define a function to click the button
   def clickButton(button = event.source.parent.getComponent('Refresh')):
      import system
      button.doClick()
      system.gui.messageBox("Button has been clicked!")
 
   # Tell the system to invoke the function after
   # the current event has been processed
   system.util.invokeLater(clickButton)
Keywords

system util invokeLater, util.invokeLater

  • No labels