Minor Lua Playdate SDK docs feedback

Apologies if I've reported these before, but I've been working on improving the scraper for playdate-luacats and noticed few minor issues in the Lua SDK docs which I'm currently having to work around:

Incorrect in 2.7.1:

  1. playdate.network.http:query has the incorrect signature (missing method). Should be:
    playdate.network.http:query(method, path, [headers], [data]) not
    playdate.network.http:query(path, [headers], data).
  2. playdate.graphics.setClipRect(rect) is incorrectly duplicated under playdate.graphics.setClipRect(x, y, width, height). It has it's own definition one line below so the duplicated method can be removed.
  3. playdate.graphics.sprite:setStencilPattern is listed in the docs as playdate.graphics.setStencilPattern (missing sprite)
  4. playdate.graphics.sprite:setStencil is listed in the docs as playdate.graphics.setStencilPattern (missing sprite)
  5. playdate.graphics.sprite.setStencilPattern({ row1, row2, row3, row4, row5, row6, row7, row8 }) should not be a table and just be playdate.graphics.sprite.setStencilPattern(row1, row2, row3, row4, row5, row6, row7, row8 (no braces) as the table form is already documented as playdate.graphics.setStencilPattern(pattern)
  6. playdate.sound.synth:setADSR function signature is missing curvature
  7. playdate.ui.crankIndicator:getBounds Function signature and docs are missing optional parameters [xOffset, yOffset].
3 Likes

I just checked and all of the issues above are still unfixed in SDK v3.0.2.

Additional issues introduced in SDK v3.0.2:

Playdate SDK Changelog notes the following:

  • Added missing snd.signal functions setOffset() and setScale() to snd.lfo and snd.controlsignal

  1. These should have their own method entries / anchors with distinct descriptions.
  2. They should have the correct parameter names.
    :setScale(scale) not :setScale(depth) and
    :setOffset(offset) not :setOffset(center)
1 Like

Here are some more, which I thought I had reported previously, but can't seem to find any when I search the forum:

  1. getSectionHeaderHeight should be an instance method, not a classmethod. playdate.ui.gridview (: not .) getSectionHeaderHeight.
  2. playdate.ui.gridview:setNumberOfRows(…​) has a unicode …​ should be ....
  3. The frameTimer properties and timer properties are instance properties not class properties (: not .).
  4. Some callbacks, like playdate.update() have () while others are missing it. Also some of them may have optional arguments too.
    playdate.keyboard.keyboardDidShowCallback()
    playdate.keyboard.keyboardDidHideCallback()
    playdate.keyboard.keyboardWillHideCallback()
    playdate.keyboard.keyboardAnimatingCallback()
    playdate.keyboard.textChangedCallback()
    playdate.timer.timerEndedCallback(...)
    playdate.timer.updateCallback(...)
    playdate.frameTimer.timerEndedCallback(...)
    playdate.frameTimer.updateCallback(...)
2 Likes

Just a quick shoutout to @notpeter for keeping together one of the most essential libraries for playdate development out there! You're a hero! (And I hope these issues are fixed :smiley: Let us know if there's anything us non-Panic folks can do to help!)

1 Like