From f3d5e15b3359dd3fa724746e33ab1cefafb6e88b Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sun, 1 Jan 2012 13:37:49 +0100 Subject: [PATCH] class libray: move deprecated Model to deprecated-3.5.sc Signed-off-by: Tim Blechmann --- SCClassLibrary/Common/GUI/Model.sc | 29 --------------------------- SCClassLibrary/deprecated/deprecated-3.5.sc | 31 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/SCClassLibrary/Common/GUI/Model.sc b/SCClassLibrary/Common/GUI/Model.sc index 306631f78..26d8adc4b 100644 --- a/SCClassLibrary/Common/GUI/Model.sc +++ b/SCClassLibrary/Common/GUI/Model.sc @@ -1,32 +1,3 @@ -Model { - var <>dependants; - - *new { - this.deprecated(thisMethod, Object.class.findMethod(\new)); - "NB Model's functionality is duplicated by Object".postln; - ^super.new; - } - changed { arg what ... moreArgs; - dependants.do({ arg item; - item.update(this, what, *moreArgs); - }); - } - addDependant { arg dependant; - if (dependants.isNil, { - dependants = IdentitySet.new(4); - }); - dependants.add(dependant); - } - removeDependant { arg dependant; - if (dependants.notNil, { - dependants.remove(dependant); - }); - } - release { - dependants = nil; - } -} - SimpleController { var model, actions; // responds to updates of a model diff --git a/SCClassLibrary/deprecated/deprecated-3.5.sc b/SCClassLibrary/deprecated/deprecated-3.5.sc index 759e37465..2740ed767 100644 --- a/SCClassLibrary/deprecated/deprecated-3.5.sc +++ b/SCClassLibrary/deprecated/deprecated-3.5.sc @@ -22,6 +22,37 @@ Pflow : FilterPattern { } } +Model { + var <>dependants; + + *new { + this.deprecated(thisMethod, Object.class.findMethod(\new)); + "NB Model's functionality is duplicated by Object".postln; + ^super.new; + } + changed { arg what ... moreArgs; + dependants.do({ arg item; + item.update(this, what, *moreArgs); + }); + } + addDependant { arg dependant; + if (dependants.isNil, { + dependants = IdentitySet.new(4); + }); + dependants.add(dependant); + } + removeDependant { arg dependant; + if (dependants.notNil, { + dependants.remove(dependant); + }); + } + release { + dependants = nil; + } +} + + + + Mix { *ar { arg array; -- 2.11.4.GIT