Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.
Giorgio Garofalo edited this page Feb 10, 2021 · 16 revisions

Functions called by the program under certain circumstances are called events.
They are: (list will expand)

  • onLoad(): called once the add-on is loaded
  • onInit(): called once Chorus is fully initialized
  • onClose(): called once Chorus is closed
  • onDisable(): called once the add-on is manually disabled. NOT called by onClose(). [currently unsupported]
  • onKeyPress(event): called every time a key or a key combination is pressed. event refers to a JavaFX KeyEvent.
  • onDropMenuOpen(type, menu): called when a drop-menu is opened. type is a string which refers to the unique identifier of the menu. menu is the menu itself.
  • onTabSwitch(tab): called when the user changes tab.
  • onTabOpen(tab): called when a new tab is opened.
  • onTabClose(tab): called when a tab is closed. Not called when Chorus is closed.
  • onAreaTextChange(change, area): called every time a text in an editor area is changed.
  • onAreaKeyPress(change, area): called whe a key or a key combination is pressed inside of a text area. event refers to a JavaFX KeyEvent.
  • onHighlightingUpdate(area): called whenever an editor area updates its highlighting.
  • onInfoBoxOpen(box): called whenever an information box is opened.
  • onInfoBoxContentUpdate(box): called when an information box text changes (commonly after a connection).

Example code:

function onLoad() {
    print('I have been initialized');
}

function onInit() {
    print('Chorus has been initialized');
}

function onClose() {
    print('Chorus has been closed');
}

Clone this wiki locally