Hello, I was thinking about scope for receive/send names yesterday and
thought of a way to implement something more flexible than
(explicitly) using $0 to define the scope of send/receive pairs (and
possibly other objects that register a symbol).
My hack makes use of my "get" method for canvases patch: http://sourceforge.net/tracker/?func=detail&aid=3308027&group_id=557...
Right now I'm seeing several categories, and I'm not sure how they all relate--
meaning they may or may not require different approaches:
.x12345 name before the s/r symbol
all the way to toplevel 3) ways to communicate among abstraction instances, including
_this_ abstraction, all abstractions on the parent, parent of parent, etc., to toplevel
ways to communicate among all libdir abstractions*
global s/r names, abstraction global s/r names
#1 is pretty simple-- just add an attribute for the canvas symbol to the "get" method,
and prefix it to the s/r symbol. #2 is pretty simple, too-- just use integers to specify how far up the tree you want to
go, get the $0 for that canvas environment, and prefix it to the s/r symbol. #3 is similar to #2, except that you also prefix the directory and filename with the $0 #4 is like #3 except that you leave out the filename #5 global is nothing prefixed, abstraction global is the directory and filename with no $0
I've made some abstractions [to] and [from] that can do the job for #1, 2, and global. ($1 for level, $2 for the s/r symbol-- though I'm not sure if that's the best order)
The question is do I also try to add the functionality for #3, 4, and abstraction global
in those same objects, or do I make a [toabs]/[fromabs] pair for that purpose?
In a way it'd be nice if there were a standard way to address all the possibilities above
using only argument-- that way it'd be easy to add this functionality to already existing
objects, like the array dialog and iemguis, with a single combobox (and simply default
to whatever corresponds to global). The problem is that in both #2 and #3 a single float
arg would be nice to specify the level so I'm not sure how to differentiate between the
two.
Also, are there any other contexts I haven't addressed in 1-5?
-Jonathan
global [v GLOBAL_PDDP_DSP] for the dsp status, but I'm not sure if it's used by anything
other than ezoutput~.pd.