REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

Better Callback Documentation

Open Syntax-Sculptor opened this issue 1 year ago • 4 comments
trafficstars

While the callbacks page is a very useful resource for referencing what REPENTOGON has to offer, it has two faults:

  • When a callback's return type is a table, it is not stated most of the time whether it's an array or a dictionary.

  • Typos such as incorrect return types and missing parameters.

  • Could benefit from examples to onboard beginners.

  • [ ] Provide more examples

  • [ ] Fix return types and parameters

Syntax-Sculptor avatar May 02 '24 13:05 Syntax-Sculptor

I dont know if its appropiate to use the concept of a "dictionary" on lua where they dont really exist, dictionaries are just tables.

jsgnextortex avatar May 02 '24 13:05 jsgnextortex

I dont know if its appropiate to use the concept of a "dictionary" on lua where they dont really exist, dictionaries are just tables.

Yeah that's the tricky part right there. There's only a table data type but the way how it's returned should be more clear. Perhaps instead of specifying it as an "array" or "dictionary", maybe a code example for the callback could just speak for itself with what it expects to be returned?

Syntax-Sculptor avatar May 02 '24 13:05 Syntax-Sculptor

We do those on the docs, the idea is that if someone needs extra information on callbacks they would go check there, if you mean adding more code examples there then, yea, they wouldnt hurt.

jsgnextortex avatar May 02 '24 13:05 jsgnextortex

Indexed array vs. associative array ? Either way, examples should be there

Sylmir avatar May 02 '24 13:05 Sylmir