added setPoint to Dataset

nix
Pierre Alexandre Tremblay 5 years ago
parent 48b1e80613
commit 54db1f74c7

@ -40,7 +40,17 @@ FluidDataSet : FluidDataObject
this.prSendMsg(this.deletePointMsg(label)); this.prSendMsg(this.deletePointMsg(label));
} }
clearMsg { ^this.prMakeMsg(\clear,id); } setPointMsg{|label,buffer|
buffer = this.prEncodeBuffer(buffer);
^this.prMakeMsg(\setPoint,id,label.asSymbol,buffer);
}
setPoint{|label, buffer, action|
actions[\setPoint] = [nil,action];
this.prSendMsg(this.setPointMsg(label,buffer));
}
clearMsg { ^this.prMakeMsg(\clear,id); }
clear { |action| clear { |action|
actions[\clear] = [nil,action]; actions[\clear] = [nil,action];

@ -41,6 +41,9 @@ Retrieve a point from the data set into a link::Classes/Buffer::. Will report an
METHOD:: deletePoint METHOD:: deletePoint
Remove a point from the data set. Will report an error if the label doesn't exist. Remove a point from the data set. Will report an error if the label doesn't exist.
METHOD:: setPoint
Set the point: if the label exists, this method behaves like updatePoint; if the label doesn't exist, behaves like addPoint.
METHOD:: clear METHOD:: clear
Empty the data set. Empty the data set.

Loading…
Cancel
Save