Am 13.11.09 01:31 schrieb "Phil Stone" unter pkstone@ucdavis.edu:
Mathieu Bouchard wrote:
On Fri, 13 Nov 2009, Frank Barknecht wrote:
Alexandre Porres hat gesagt: // Alexandre Porres wrote:
But I totally disagree, I have been teaching a lot basic Pd around, and people always get confused and think they can just throw "$0" in messages.
That may be because your students assume, that $1 in a message box is the same as $1 in an object box when in fact it's something different.
That may be because you assume that objectboxes' $0 must have something to do with $1,$2,$3,... when in fact it's something different.
$3 stands for ce_argv[2] $2 stands for ce_argv[1] $1 stands for ce_argv[0] $0 stands for ce_dollarzero
it's a special case no matter what.
Right. Which neatly brings the question back around to "why can't $0 be used in message boxes?" I've said this before (to no avail): it is well understood that $0 has no meaning in *messages* -- however, this is not a good reason why $0 can't be used in *message boxes.*
Since "1024-foo" (where "1024" represents the canvas-identifier), *does* have meaning in messages, why must we jump through (admittedly minor, but still quite annoying) hoops just to get that canvas-identifier into a message?
It probably belongs in the "some things will never change in Pd" category; therefore we must resign ourselves to this discussion re-appearing on a regular basis.
$0 in messages is only special in the sense, that it has no meaning at all. it wouldn't make it less special to use it as a container for canvas identifier in message boxes. $-variables in objects have a different meaning from $-variables in message boxes, no matter what. I understand, that it would make patching often a lot easier, but conceptually it would be exceptional to make $0 in message-boxes be replaced by the canvas-identifier, while all other $n-variables in message-boxes get replaced by the n-th element of the incoming list. I wouldn't want to have to pay attention to n in $n in order to determine its behaviour. And i also don't support a change that would introduce an inconsistency like that. Why don't people fight with the same effort to make $1 in message boxes be replaced by the first argument of the patch?
Personally, i find it 'unecological' to just not use $0 at all in message boxes. I am haven't checked, but i think this idea must have been brought up already:
Let's make $0 in message boxes be replaced by the selector of the incoming messages. Currently, it is quite cumbersome to type check a pd message and it requires a lot of patching. Using $0 to get the '0th' element of the incoming message would be consistent with the way $-variables are currently used in message boxes and it would be tremendously useful. Just to illustrate the proposed use of $0:
the incoming message: the respective $0 'hallo velo' 'hallo' 'list mein fahrrad' 'list' 'symbol bike' 'symbol' '12 twentyfour' 'list' '12' 'float' 'bang' 'bang' 'bla' 'bla'
If this could be implemented, any future discussion about why $0 in message boxes is not replaced by the canvas identifier would be lapsed.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de