Functions incorrectly marked as a member method in Inside Playdate


The icon should be an F for function instead of method.

Also, setRedrawsOnImageChange() right below seems to be missing its icon.

Same thing with


Capture d’écran 2022-06-02 à 10.58.01



This one seems like the icon is incorrect but also the term used in the note is misleading.

If the icon is correct in this case then why are similar api call (i.e. non-instance methods) are marked with an F icon. If the icon is incorrect then the term 'class method' is confusing since methods like this are marked as F (i.e. functions) elsewhere.

I'm new to Lua so I may be misunderstanding things here :slight_smile:

Yeah, this is confusing. Lua doesn't have a built-in concept of "classes." All it knows are tables. The OO library we provide (CoreLibs/object) uses tables constructed in a certain way to implement inheritance and other OO principles. This means class methods are just functions in a table; instance methods are just functions in a table that take a "self" object as their first argument (the colon syntax is just a shortcut for this). But we also use tables as namespaces, without any way of instantiating them as classes, and those namespace tables are full of functions that get called in the same way as class methods. So the lines are pretty blurry.

We've chosen to use M for functions that are part of "classes" in that OO system, and F for functions that aren't associated with classes. Sorry about the confusion! We plead Lua.

That said, I think you're right that the keyboard functions should be marked F. We'll look into it. Thanks!