[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] problem with Event



Ahh, ok, I see the point:

doing e.func already executes the function at slot func, but not only with the given arguments, but with an additional first arg, namely the event itself...

So doing

e.func(e.data[0])

is something completely different than doing

e[\func].value(e[\data][0])

right?

Unfortunately difficult to explain (and to motivate) to sc-beginners (which I have to do now...)...


regards
Till

On 29 Aug 2005, at 18:04, James Harkins wrote:

e.func = { |self, arr| arr.class.postln };
e.func(e.data[0]);

I'm sure that's documented somewhere... I know it's in the list archives.

http://www.create.ucsb.edu/pipermail/sc-users/2003-December/ 007200.html

hjh

On 8/29/05, Till Bovermann <tboverma@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

    e = ();

e.data = ({1.0.rand}!100).clump(5);

e.func = {|arr| arr.class.postln}

e.func.value(e.data[0])

-> Event

e[\func].value(e[\data])

should be e[\data][0]


-> Array

should be Float




????? (should be both Array...)
????? (should be both Float...)



regards
Till
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users




--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users