probably overkill to worry about all of the hierarchy.
As the concept is to persist across ultiple runs, the other (unmentioned above) thought of using object refs wouldn't be entirely consistent, even if it would yield a simple unique and persistent "name" for each item.
It probably is best to go with storing the original name of the gadget in every gadget that can gain a hotkey (I'm guessing it only holds the current text at present), and then use that stored value whenever you set the hotkey on the gadget.
Another alternative option could be to change the maxgui API, add a "hotkeyid" tag to SetGadgetHotkey, and then add a "HotkeySave" and "HotkeyLoad" function across all platforms - neatly solving the gtk issue, but creating one for other platforms (albeit that once implemented enables users to very easily save & load hotkeys?
Not convinced, but worth a passing thought...
As the concept is to persist across ultiple runs, the other (unmentioned above) thought of using object refs wouldn't be entirely consistent, even if it would yield a simple unique and persistent "name" for each item.
It probably is best to go with storing the original name of the gadget in every gadget that can gain a hotkey (I'm guessing it only holds the current text at present), and then use that stored value whenever you set the hotkey on the gadget.
Another alternative option could be to change the maxgui API, add a "hotkeyid" tag to SetGadgetHotkey, and then add a "HotkeySave" and "HotkeyLoad" function across all platforms - neatly solving the gtk issue, but creating one for other platforms (albeit that once implemented enables users to very easily save & load hotkeys?
Not convinced, but worth a passing thought...