[PD-dev] canvasdelete search method
Jonathan Wilkes
jancsika at yahoo.com
Tue Nov 20 21:33:09 CET 2012
I see canvasdelete adds a "delete" method for canvas.
I'm thinking of adding a "deleteany" method that takes A_GIMME
and deletes any object that matches the args.
Examples:
[deleteany foo(--[sendcanvas] deletes [foo] and [foo 12]
[deleteany foo 12(--[sendcanvas] deletes [foo 12] but not [foo]
Or maybe this interface would fit better with dynamic patching:
[deleteany obj foo(--[sendcanvas] deletes [foo] and [foo 12] but not [foo(
[deleteany text foo 12(--[sendcanvas] deletes comment "foo 12"
[deleteany msg(--[sendcanvas] would delete all message boxes
Basically combining the core functionality of the "find" method with the "delete"
method.
It would be a mildly useful improvement, but could be very useful if there were
something like this:
[connectany "obj foo" 0 "obj bar" 0(--[sendcanvas] [foo] [bar] becomes [foo]--[bar]
Unfortunately Pd doesn't have sublists, and symbols with spaces are still pretty
clunky.
Maybe connectany should be a separate external rather than a canvas method. Can anyone
think of a decent interface for something like this? It would vastly improve the flexibility
of dynamic patching.
-Jonathan
More information about the Pd-dev
mailing list