On Tue, Aug 02, 2011 at 03:02:47PM -0700, Jonathan Wilkes wrote:
> If you look at the canvas "get" method I added to the tracker, you'll see I 
> have a "get parent RECEIVE-SYMBOL" message that returns a pointer to the 
> parent canvas (or a zero if there isn't one).  This allows you to:
> 
> [bng]
> |
> [f $0]
> 
> |
> 
> [get parent $1-rcv]
> |
> [s pd-$0-mysubpatch]
> 
> [r $0-rcv]
> |
> [route parent]
> |
> [route 0]
>         |
> 
> [pointer]
> 
> 
> Now [pointer] is pointing at the parent of [pd $0-mysubpatch], so if I 
> immediately follow this by sending the message "send-window obj 20 20 clip" 
> to [pointer], I get a [clip] object on it's parent.  That's just a silly 
> example, but notice it's different than sending to pd-PATCH-FILENAME.pd, 
> which would draw a [clip] on every instance of that patch that is open.
> 
> Put this in an abstraction and it obsoletes [namecanvas].  Or create an 
> abstraction to climb to the root, or the toplevel, etc.
> >> 

Amazing!

Chris.

-------------------
http://mccormick.cx

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to