[PD-dev] may have figured out scope
IOhannes m zmölnig
zmoelnig at iem.at
Mon Nov 19 23:32:32 CET 2012
On 11/19/2012 09:28 PM, Jonathan Wilkes wrote:
> ----- Original Message -----
> What does [local foo] do different than [declare foo]? I assume with your
i would mainly object to [declare foo] because it seems to impose a
hierarchy between the things you can [declare] and pushing global/local
namespaces to the top, without any good reason.
i'd thus go for something like [declare -localvar foo].
> I'm not removing $0-- as I said my solution is backwards compatible. Replace
> canvas name ".xblah" with "$0" in what I wrote and it works exactly the same.
you are talking a lot about "canvas", which in my understanding means,
that you could have a variable that is local to a subpatch. currently $0
is local only to an abstraction and is shared between subpatches.
is there a specific reason for this or is it just a slip of words?
> One more question that applies to any system of scoping-- how do you apply it
> to the message box? I forgot about that aspect when I wrote the OP.
for me "message local" applies to local for a specific message (that is:
[1, 2(
|
[$0-$1(
could evaluate to "2352-1" and "4321-2".
i see little use to that, which is probably the reason why $0 doesn't
expand at all in messages.
i also don't know exactly what the problem is you are envisioning.
something like that?
<abstraction>
[declare -localvar read]
[; filereader read /tmp/bla.txt(
[r filereader]
|
[textfile]
</abstraction>
and having two <abstraction/>s in your patch and clicking on the msgbox
in one of them resulting in "[textfile]: no method for local 'read'" in
the other???
fgasdr
IOhannes
More information about the Pd-dev
mailing list