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

Re: [sc-dev] moveNode...Msg



In Node:

	moveBeforeMsg { arg  bundle, aNode;
		^bundle.add([18, nodeID, aNode.nodeID]);//"/n_before"
	}
	moveAfterMsg { arg bundle, aNode;
		^bundle.add([19, nodeID, aNode.nodeID]); //"/n_after"
	}
	moveToHeadMsg { arg bundle, aGroup;
		^bundle.add((aGroup ? group).moveNodeToHeadMsg(this));
	}
	moveToTailMsg { arg bundle, aGroup;
		^bundle.add((aGroup ? group).moveNodeToTailMsg(this));
	}


Why is this not moveBeforeMsgToBundle etc? Every other method ...Msg returns the message itself as an array, not the bundle. This threw me today while I was working on bundling some messages.

H. James

when felix introduced this naming convention instead of the previous
he must have forgotten to change those.

these are not correct and used nowhere in the system, so we should change them.
they should be:

moveBeforeMsg { arg  bundle, aNode;
		group = aNode.group;
		^bundle.add([18, nodeID, aNode.nodeID]);//"/n_before"
	}
	moveAfterMsg { arg bundle, aNode;
		group = aNode.group;
		^bundle.add([19, nodeID, aNode.nodeID]); //"/n_after"
} moveToHeadMsg { arg bundle, aGroup;
		group = aGroup;
		^(aGroup ? group).moveNodeToHeadMsg(bundle, this);
	}
	moveToTailMsg { arg bundle, aGroup;
		group = aGroup;
		^(aGroup ? group).moveNodeToTailMsg(bundle, this);
	}

--








.