Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more dictionary methods #183

Open
isabelgk opened this issue Dec 7, 2021 · 1 comment
Open

Expose more dictionary methods #183

isabelgk opened this issue Dec 7, 2021 · 1 comment

Comments

@isabelgk
Copy link
Contributor

isabelgk commented Dec 7, 2021

It doesn't seem possible right now to get a count of keys in a dictionary (e.g. with max::dictionary_getentrycount()). It's possible from a subdict because you can get an atom_reference and then get the size of that, but it's not straightforward for a plain dict.

I'm sure there are more methods that would be useful to wrap: https://cycling74.com/sdk/max-sdk-8.2.0/group__dictionary.html


From forums: https://cycling74.com/forums/accessing-nested-dictionaries-in-min/replies/1#reply-61afc274f0337245190dfa51

@testcase
Copy link

Here are some other items that should be exposed.
max::dictionary_getkeys_ordered maybe a method which returns std::vec with keys in it and calls max::dictionary_freekeys to free underlying handle.

max::dictionary_appendatoms by having a [](atoms a) operator ?

read and writing from json file.

would love a way to call a lambda on all entries in a dict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants