Skip to content
João Cardoso edited this page Dec 4, 2019 · 6 revisions

Do not assign capitalized fields

Sushi runs under the assumption that lower-case fields/proprieties are assigned by users, but capitalized ones are part of the class implementation. This is why Base clears all lower-case fields when a frame is :Reset.

In short, ❌ DO NOT:

sushiframe.CapitalizedField = 10
sushiframe:Release()

✔️ Do instead:

sushiframe.lowerCaseField = 10
sushiframe:Release()

This ensures that your assigned field is reset on release and does not interfere when the frame is reused by another addon.

Do not load unused classes

After fully developing your project, it's advised to not include the classes which you do not require. This measure will improve loading time and reduce RAM usage. For that purpose:

  1. Inside the directory of the library, navigate to classes.
  2. On that particular folder structure, you will find a .lua file for each class.
  3. Remove the unused ones.

Sushi-3.1 🍣

Documentation
Class Reference
Best Practices

Feedback
Post an issue

Clone this wiki locally