Open porres opened 2 weeks ago
bind enter to other parameters in properties (checkboxes and dropmenus)
In gui boxes and iemguis I can hit enter and 'ok' takes focus, but here on [knob] I get tcl tk errors
@sebshader and @timothyschoen could you help me figure this out?
The only point where I have 'iemgui' in the code is here in this line
https://github.com/porres/pd-else/blob/master/Source/Extra/knob_dialog.h#L239
" ::pd_bindings::dialog_bindings $id \"iemgui\"\n"
and if I rename this to something 'else', like "elsegui", the red button here on my mac gives me an error
so I guess we have some garbage from having copied things from iemguis code, and we can't rename it, but we cannot also have it named like that as it won't find the "::dialog_iemgui::" thing. Right now I have "::knob::" instead, so maybe I need to rename things accordingly. Will try...
so maybe I need to rename things accordingly. Will try...
I renamed
" ::pd_bindings::dialog_bindings $id \"iemgui\"\n"
to
" ::pd_bindings::dialog_bindings $id \"knob\"\n"
but I still get errors
renamed ::knob:: to _::dialogknob:: and now I get no errors! Damn...
but this is not how things work in GUI BOX properties for instance, as hitting enter brings into focus the 'ok' button, now I just get things closed as the ok button is not just into focus, but as if it was clicked on... not that bad, but weird as I don't understand why.
I also don't understanf how I can rename things in a way that I don't need 'iemgui', will try renaming again.
will try renaming again.
ok,. now I renamed all "iemgui" words to "elsegui" and things work, without errors! So I'm happy I got rid of the 'iemgui' reference! I would still like that the 'enter/return' key wouldn't close the dialog right away and just focus the 'ok' button as in other pd internals, but somehow that doesn't happen!
I think you need to change the "apply_and_rebind_return" proc somehow or add an alternative
I think you need to change the "apply_and_rebind_return" proc somehow or add an alternative
thanks @sebshader I will take a look later, but this is not a priority right now. I did all the important things but now I'm failing miserably in getting a dropmenu to work in [knob]. I tried adapting the code from else/note and it didn't work. Been trying it for hours, literally, no luck and I can't make any sense of why it doesn't work.
Here we can see and use the dropmenu in [note]
in the [knob] I can't see anything but the label "Mode:", the dropmenu simply doesn't appear at all...
If I can get it to show I can do the rest.
For reference, this is the failed commit https://github.com/porres/pd-else/commit/8ab47d41439d2a72d441a632119c0b232efb45dc
And here's the code that works for [note] https://github.com/porres/pd-else/blob/master/Source/Control/note.c#L1649
Do you think you can help me @sebshader ? You're the most fluent tcl/tk friend I know :) I am also asking the help of @timothyschoen but he's just a genius, not a tcl/tk genius, he can do stuff because of his geniality but has no real expertise
In properties:
have a dropmenu for number mode
maybe also have a dropmenu for logmode
hitting enter should focus 'ok' and not close the window as if you hit the ok button, right? Well, that's how it works in vanilla, but I guess this is ok...
BUGS:
More Ideas