Events > Advanced


Custom Events

Custom Event

event-custom

A Custom Event is an event that can be called from this behavior (using the trigger event block), or as a response to messages that get sent by other behaviors (using one of the trigger event ... in ... blocks). The former is like a function call. The latter is different from function calls since sending out a message doesn't specify a recipient, so multiple recipients could exist.

example


Custom Blocks

Custom Block

event-custom-block

Lets you create a regular Custom Block.


Global Custom Block

event-custom-block-global

Lets you create a global (static) Custom Block.


Custom Code

Arbitrary Code

event-custom-code

Not an event. Lets you insert arbitrary code into your behavior at the "class" level. You could use this to define functions or add class-level fields, for example. Use code blocks within this wrapper.


Import Statements

event-custom-import

Not an event. Lets you add import statements to the beginning of your behavior's "class". Use code blocks within this wrapper.