porres / pd-else

ELSE - EL Locus Solus' Externals for Pure Data
Do What The F*ck You Want To Public License
298 stars 35 forks source link

[knob] To do #2195

Open porres opened 2 weeks ago

porres commented 2 weeks ago

In properties:


BUGS:


More Ideas

porres commented 3 days 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

Screenshot 2024-11-20 at 11 24 45 Screenshot 2024-11-20 at 11 24 54

@sebshader and @timothyschoen could you help me figure this out?

porres commented 3 days ago

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

Screenshot 2024-11-20 at 12 18 31

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...

porres commented 3 days ago

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

Screenshot 2024-11-20 at 12 25 39
porres commented 3 days ago

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.

porres commented 3 days ago

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!

sebshader commented 1 day ago

I think you need to change the "apply_and_rebind_return" proc somehow or add an alternative

porres commented 1 day ago

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]

Screenshot 2024-11-22 at 14 56 34

in the [knob] I can't see anything but the label "Mode:", the dropmenu simply doesn't appear at all...

Screenshot 2024-11-22 at 14 57 37

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