Skip to content

Commit

Permalink
NdefMixer: improve doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
adcxyz committed Dec 26, 2024
1 parent 9e56ce3 commit 799dfca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions HelpSource/Classes/NdefMixer.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@ CLASSMETHODS::
method:: forServer
Make an NdefMixer that follows the specific server given. This becomes relevant when Ndef.clear is used:
code::
x = NdefMixer.new(s, 5); //
// NdefMixer as before
x = NdefMixer.new(s, 5);
// NdefMixer that has a server to follow
y = NdefMixer.forServer(s, 5).moveTo(10, 50);
Ndef(\foo, {SinOsc.ar}); // m gets updated
// Clear all proxyspaces in Ndef.all, and replace with new ones

Ndef(\foo, {SinOsc.ar}); // both show foo
// Clear all proxyspaces in Ndef.all, and replace with new ones:
Ndef.clear; // -> foo disappears on both.
// running foo it again, it does not show on x,
// because m is still holding on to the old proxyspace;
// but because y follows the server, it shows there:
// because x is still holding on to its old proxyspace;
// it does show on y, because y follows its server:
Ndef(\foo, {SinOsc.ar});
x.server; // x does not know its server
x.server; // x does not have its server
y.server; // y does.
::

Expand Down

0 comments on commit 799dfca

Please sign in to comment.