Skip to content

GuiTabBar binding has [potentially] incorrect value type for second argument #192

@mordof

Description

@mordof

I was trying to use GuiTabBar, and the second argument is using (in the bindings for it) pointerFromValue(info, 4) and casting to const char **. The cast (I think) makes sense, but the value collection there is expecting a number from the javascript function like this. It's supposed to be an array of strings for the tab names, is it not?

Looking through the Napi helpers that have been made at the top of node-raylib.cc, there doesn't appear to be anything that handles javascript arrays as arguments.

If I try and call GuiTabBar with the number (I just put the number 3.. not sure what else I would put 😆 ) as the second argument that it's asking for, I get this: Process exited with code 3221225477. which seems to be a memory access violation. That makes sense though passing 3, and then it's trying to use that as a pointer location.

Am I missing a step in how to call GuiTabBar? possibly how to provide an array to the bindings layer to give me back a pointer, and provide that to the function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions