Hello, A question about templates : In a 'data-field window' of my patch, I need two types of elements :
classic object boxes (I can have to redraw them occasionally).
(polygons that can be moved with the mouse to change some values)
I know I can send a 'clear' message to the data window to clear it's content. But I'd like to clear the scalars only, and keep the fixed elements. (I noticed it's easy to do the opposite: clear the content of every template, and keep the scalars)
For a kind of gui-patch, I need to reorganize my scalars, so to clear them and append them again, but I don't want to clear everything in the data-window and 'redraw' everything.
Is it possible (I mean with Pd-0.34) ? Does Pd-0.35 handle this kind of thing better ?
Thank you, and apologies for my previous post, I was just amazed and happy to discover all the new features in the last test-release. :)
nicolas
Hi Nicolas,
You can't selectively clear part of a window... I'm curious why you want to though... are you by any chance using the deadly "namecanvas" object? I'll do anything to get people to stop using that one...
cheers Miller
On Thu, Jan 24, 2002 at 10:56:55PM +0100, Nicolas Lhommet wrote:
Hello, A question about templates : In a 'data-field window' of my patch, I need two types of elements :
- fixed elements, just created with simple templates and no variable, and
classic object boxes (I can have to redraw them occasionally).
- scalars, some objets created with 'append' from the same template
(polygons that can be moved with the mouse to change some values)
I know I can send a 'clear' message to the data window to clear it's content. But I'd like to clear the scalars only, and keep the fixed elements. (I noticed it's easy to do the opposite: clear the content of every template, and keep the scalars)
For a kind of gui-patch, I need to reorganize my scalars, so to clear them and append them again, but I don't want to clear everything in the data-window and 'redraw' everything.
Is it possible (I mean with Pd-0.34) ? Does Pd-0.35 handle this kind of thing better ?
Thank you, and apologies for my previous post, I was just amazed and happy to discover all the new features in the last test-release. :)
nicolas
From: "Miller Puckette" :
You can't selectively clear part of a window... I'm curious why you want to though... are you by any chance using the deadly "namecanvas" object? I'll do anything to get people to stop using that one...
No, I don't use namecanvas (pd-messages are ok). I attempt to do some gui stuff with templates. It's possible to clear the data window and object list with a "clear" message to the window, but in a graphic interface, it's usefull to be able to delete or redraw some objects, without clearing it all and redrawing.
(I still don't master the templates terminology well. In what follows, a "graphic object" is a displayed scalar.)
Another thing is to get some fixed objects (that you can't modify with the mouse) in the data window. With pd-0.34.2, I noticed it was possible to add this kind of objects (like a drawpolygon object with fixed values) by sending a message ("pd-template obj X Y ... ... ...") to a template window. The data window was automagically updated, the same if I removed the drawpolygon object box (a bit tricky, but better than nothing :).
Last days I spent some time with templates on pd 0.35, "struct" is a good thing (and all the related bugfixes too) but actually I can do less than before (may be some of it is on your todo list).
I know that a more complete gui-toolkit is not a priority for Pd, but here is my little wish-list:
the mouse in the data window, but which you can set parameters to from the patch
the front layer.
regards nicolas