Skip to content

window.openFileDialog()'s list has objects with no properties #87

@cookiengineer

Description

@cookiengineer

When using the window.openFileDialog() API, the returned list that the callback receives as a parameter is an empty object with no keys and no values.

window.openFileDialog([
    'png', 'json'
], function(result) {

    for (let r = 0, rl = result.length; r < rl; r++) {
        let entry = result[r];
        console.log(typeof entry, JSON.stringify(Object.keys(entry));
        console.log(typeof entry, JSON.stringify(Object.values(entry));
    }

});

Both Object.keys() and Object.values() return empty Arrays. When stringifying the entries themselves, they are just empty objects ({}). I was trying to figure out myself what was going on inside the X11UIInterface.cpp/h files, but to be honest I have no clue how the memory looks like and how to properly convert/verify the data there.

Tested system: Up-to-date archlinux, with GNOME3 stable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions