From d33fef37d47796926f27669c18c75fa1c01a954e Mon Sep 17 00:00:00 2001 From: Pierre Alexandre Tremblay Date: Wed, 3 Nov 2021 16:15:32 +0000 Subject: [PATCH] corrected errors in LabelSet classdef and help + added getIDs --- release-packaging/Classes/FluidLabelSet.sc | 9 +++++++++ .../HelpSource/Classes/FluidLabelSet.schelp | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/release-packaging/Classes/FluidLabelSet.sc b/release-packaging/Classes/FluidLabelSet.sc index 7f0d9c3..4d7f745 100644 --- a/release-packaging/Classes/FluidLabelSet.sc +++ b/release-packaging/Classes/FluidLabelSet.sc @@ -51,4 +51,13 @@ FluidLabelSet : FluidDataObject { actions[\print] = [string(FluidMessageResponse,_,_),action]; this.prSendMsg(this.printMsg); } + + getIdsMsg{|labelSet| + ^this.prMakeMsg(\getIds, id, labelSet.asUGenInput); + } + + getIds{|labelSet, action| + actions[\getIds] = [nil,action]; + this.prSendMsg(this.getIdsMsg(labelSet)); + } } diff --git a/release-packaging/HelpSource/Classes/FluidLabelSet.schelp b/release-packaging/HelpSource/Classes/FluidLabelSet.schelp index 24b1bba..2319562 100644 --- a/release-packaging/HelpSource/Classes/FluidLabelSet.schelp +++ b/release-packaging/HelpSource/Classes/FluidLabelSet.schelp @@ -33,20 +33,32 @@ ARGUMENT:: identifier The identifier for this label. ARGUMENT:: label The label to update. +ARGUMENT:: action +A function to run when the operation completes. METHOD:: getLabel Retrieve the label associated with an identifier. Will report an error if the identifier is not present in the set. ARGUMENT:: identifier The identifier for the label to be retrieved. +ARGUMENT:: action +A function to run when the operation completes. METHOD:: deleteLabel Delete a label given a certain identifier. ARGUMENT:: identifier The identifier to be deleted. +ARGUMENT:: action +A function to run when the operation completes. METHOD:: clear Empty the label set. +METHOD:: getIds +Export to the labelset IDs to a link::Classes/FluidLabelSet::. +ARGUMENT:: labelSet +The link::Classes/FluidLabelSet:: to export to. Its content will be replaced. +ARGUMENT:: action +A function to run when the export is done. METHOD:: print Post an abbreviated content of the label set in the window by default, but you can supply a custom action instead.