Open
Description
Would it be possible to include the getKeys method of the max API for dictionaries to the min API ? If not, would it be possible to ad a function returning the underlying max dictionary ?
I can't figure out how to get the underlyning max dictionary from the dict class, as the only casting functions casts the object to a max::t_object*.
Thanks a lot !
Activity
isabelgk commentedon Feb 27, 2025
This is a reasonable request! In the meantime, you can simply cast the
max::t_object*
to amax::t_dictionary*
when using with the C-based API. (This is a general pattern you would see in the Max SDK wheret_object
acts kind of like a base class. A struct that has at_object
as the first member, liket_dictionary
, is passed around as the more generalt_object*
pointer.) You can see in the min-api that the max::t_object* operator is returning what is indeed an underlyingmax::t_dictionary*
just as amax::t_object*
pointer.janmech commentedon Mar 21, 2025
Wanted to make a pull request, but I didn't manage.
adding this code to c74_min_dictionary.h will add two new methods:
dict.entrycount()
dict.keys()
to get the entry count and a the keys respectively.
update: pull request created: Cycling74/min-api#202