@Fireable
- Description
Mark methods with this annotation in order to add a method control (bang) to the Tinker panel. Functions marked with @Fireable may have one or more parameters, each of which should be annotated with some incarnation of @Editable. @Fireable methods must be marked public.
As the Processing grammar does not yet recognize Annotations, this feature is only available to programmers using a separate IDE such as Eclipse.
- Syntax
@Fireable public void doSomething() { // does something } @Fireable public void doSomethingWithParameters(@Editable int count) { // does something } @Fireable(auto = true) public void doSomethingAuto(@EditablePath String filePath) { // does something as soon as filePath is specified } @Fireable(comment="This is what it does!") public void doSomethingCommented() { // Adds a tooltip to this method control } @Fireable public void doSomethingTwoParams(@Editable(name="count") int count, @Editable(name="size") float size) { // Unfortunately, parameter names cannot be read reflectively. // Use the optional "name" parameter to add a label to a parameter control. }- Parameters
- auto
- boolean: if true, the method is fired once any parameter is changed
- comment
- String: adds a tooltip to the method control
- Returns
- None
- Usage
- Web & Applications
- Related
No Comments
You must be logged in to post a comment.