Skip to content

Commit

Permalink
Fix old examples in OSCFunc/OSCdef help
Browse files Browse the repository at this point in the history
  • Loading branch information
muellmusik committed Mar 10, 2012
1 parent e7a8c77 commit 5f5534d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions HelpSource/Classes/OSCFunc.schelp
Expand Up @@ -93,9 +93,9 @@ EXAMPLES::
code::
n = NetAddr("127.0.0.1", NetAddr.langPort); // local machine

OSCFunc.newMatching({|time, msg, addr| \matching.postln}, '/chat', n); // path matching
OSCFunc({|time, msg, addr| \oneShot.postln}, '/chat', n).oneShot; // once only
OSCdef(\test, {|time, msg, addr| \unmatching.postln}, '/chat', n); // def style
OSCFunc.newMatching({|msg, time, addr, recvPort| \matching.postln}, '/chat', n); // path matching
OSCFunc({|msg, time, addr, recvPort| \oneShot.postln}, '/chat', n).oneShot; // once only
OSCdef(\test, {|msg, time, addr, recvPort| \unmatching.postln}, '/chat', n); // def style

m = NetAddr("127.0.0.1", NetAddr.langPort); // loopback

Expand All @@ -114,7 +114,7 @@ AbstractResponderFunc.allDisabled

// change funcs
OSCdef(\test).enable;
OSCdef(\test, {|time, msg, addr| 'Changed Unmatching'.postln}, '/chat', n); // replace at key \test
OSCdef(\test, {|msg, time, addr, recvPort| 'Changed Unmatching'.postln}, '/chat', n); // replace at key \test
m.sendMsg("/chat", "Hello App 1");
OSCdef(\test).add(f = {\foo.postln}); // add another func
m.sendMsg("/chat", "Hello App 1");
Expand Down
8 changes: 4 additions & 4 deletions HelpSource/Classes/OSCdef.schelp
Expand Up @@ -86,9 +86,9 @@ EXAMPLES::
code::
n = NetAddr("127.0.0.1", 57120); // local machine

OSCdef(\test, {|time, msg, addr| \unmatching.postln}, '/chat', n); // def style
OSCdef.newMatching(\test2, {|time, msg, addr| \matching.postln}, '/chat', n); // path matching
OSCdef(\test3, {|time, msg, addr| \oneShot.postln}, '/chat', n).oneShot; // once only
OSCdef(\test, {|msg, time, addr, recvPort| \unmatching.postln}, '/chat', n); // def style
OSCdef.newMatching(\test2, {|msg, time, addr, recvPort| \matching.postln}, '/chat', n); // path matching
OSCdef(\test3, {|msg, time, addr, recvPort| \oneShot.postln}, '/chat', n).oneShot; // once only


m = NetAddr("127.0.0.1", 57120); // loopback
Expand All @@ -108,7 +108,7 @@ AbstractResponderFunc.allDisabled

// change funcs
OSCdef(\test).enable;
OSCdef(\test, {|time, msg, addr| 'Changed Unmatching'.postln}, '/chat', n); // replace at key \test
OSCdef(\test, {|msg, time, addr, recvPort 'Changed Unmatching'.postln}, '/chat', n); // replace at key \test
m.sendMsg("/chat", "Hello App 1");
OSCdef(\test).add(f = {\foo.postln}); // add another func
m.sendMsg("/chat", "Hello App 1");
Expand Down

0 comments on commit 5f5534d

Please sign in to comment.