Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

IguanaX makes it very easy to implement a custom statuses status for components. By status, we mean to show information about what the component is doing on the component’s card.

...

Expand
titleUse component.setStatus{data=Text}

Make a component and use thisThis is a basic example of how you can call the status API:

Code Block
component.setStatus{data="Hello world!"}

Where would you call it?

It depends on what the component you are writing is doing. It’s a useful tool to be able to show in real time what a component is doing on the card.

Expand
titleWhen you run the component you will see Hello world! in the status at the bottom of the component card

Remember to make sure the component is either in development mode or run off a commit with the code. SeeUsing the DEVELOPMENT CommitChoosing the code to run for your component.

Expand
titleYou can use HTML to format the status - and we provide a simple STAT library to do just that

If you import the STATus library it has a couple of helper functions to format your code more nicely with HTML markup.

Import the library and try the code example:

Code Block
local Status = STATrow("Age", 14);
component.setStatus{data=Status}

Then when you look at the card you will see nicer formatting of this data:

...