On Thu, 19 Feb 2004, B. Bogart wrote:
Guenter, on what user-centered level were you unhappy with your externals? I've been able to use button.c to do what I want withpopup in about 30 or so lines of additions (and two days of effort). Do the iemguis have any changes that make them more acceptable since your initial writing?
Its not about changes, but additions. The preferences settings (e.g the old ggext sliders needed a message "color" to set their color).
On the "user-centered" level I think the widgets are quite ok. They somehow have a faster feel than the vector drawn implementation. They are nicely decoupled from the sound engine, minimizing communication between the GUI and the pd engine.
The implementation is a bit hacky and the tcl/tk part is not sufficiently decoupled from the external (e.g. it is not easy to plug in other toolkits widgets such as QT or wxWindows).
This means before starting to expand the object with functionality this issues would have to be taken into account.
After this growing discussion, to bring things back to the thread subject, how can I get my tk widget -command to send data back over to the PD side? (see the original post for code reference) I'd really like to get it to work! pd_bind??
Yes,basically you bind the object to a symbol, say foo123 and send commands to it from the tcl/tk side (with "pd foo123 what_evermessage"). That is what the callback function in the code does.
Personally I think the bottom line is that there is interest in more intuitive (and at least for me) more well-integrated looking GUIs. I think standard tk widgets is a great way to do this, along side of a little extra GOP effort. I can post a grab the patch for which this popup menu is for if anyone is interested.
If you had the code and a small example (help file). you could check it into the CVS, thats what it is meant for.
Guenter
Thanks Ben
guenter geiger wrote:
On Thu, 19 Feb 2004, Krzysztof Czaja wrote:
hi Ben (and Guenter?),
in a short-term project you will probably find yourself on a safer side, since toxy is still very immature.
Taking a longer-term view, however, I do not understand, why should anybody prefer writing and maintaining (esp. through Pd api changes) a few-hundred-or-more-line external, to a few lines of a simple Tcl code, which has to be embedded in that external, anyway.
Well, I can only reiterate that I am not really happy with the approach that I have taken in these externals.
I didn't know about toxy at that time, if I had known, or if toxy already existed, probably I would not have changed them to use native tcl/tk widgets.
Remember, most of the sliders, bangs, toggles etc that are in the iemgui came from my external collection, so the only options I had was making mine different or removing them completely. I made them different in order to test the embedding of standard widgets.
At least, there are no fundamental stability, nor performance gains I can think of...
Absolutely right.
Guenter
Krzysztof
B. Bogart wrote: ...
I'm almost finished [popup], with a couple bugs and the biggest issue being that I can't figure out how to pass data from the tk widget back to pd.. (telling it what menu item was selected!) in GGEE button.c seems to do the magic here, could someone explain whats really going on?
sprintf(buf,"button%p",x); x->x_sym = gensym(buf); pd_bind(&x->x_obj.ob_pd, x->x_sym);
sys_vgui("proc button_cb%x {} {\n pd [concat button%p b \;]\n }\n",x,x);
defines a procedure to be configured into a button's -command. The proc, when invoked, sends a 'b' message to the object.
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev