Hi all,
please have a look at the attached changeset. I did not like the fact that dozens of models implement their own #open methods, both on instance & class side, which introduces a lot of duplication. I moved these implementation into their common superclass (Model) and tried to eliminate all equal overridden versions.
Would be nice if someone could merge this into Trunk (after our next release, I guess), if you agree :-)
Best, Christoph Model ## #open.1.cs (4K) Download Attachment
Carpe Squeak!
|
It looks like a reasonable thing to do after the release.
Note - externally maintained packages such as CommandShell and Squit (both are in the change set) will still want to keep their redundant #open and #openLabel methods, because they still need to work with images that do not have your changes in Model. Also, CommandShellTranscript does not inherit from Model, so that would need to stay the same anyway. Dave On Sat, Dec 21, 2019 at 07:46:39PM +0000, Thiede, Christoph wrote: > Hi all, > > > please have a look at the attached changeset. I did not like the fact that dozens of models implement their own #open methods, both on instance & class side, which introduces a lot of duplication. I moved these implementation into their common superclass (Model) and tried to eliminate all equal overridden versions. > > > Would be nice if someone could merge this into Trunk (after our next release, I guess), if you agree :-) > > > Best, > > Christoph Content-Description: Model ## #open.1.cs > 'From Squeak5.3beta of 21 December 2019 [latest update: #19284] on 21 December 2019 at 8:45:37 pm'! !Model methodsFor: 'toolbuilder' stamp: 'ct 12/21/2019 18:58'! open ^ ToolBuilder open: self! ! !Model methodsFor: 'toolbuilder' stamp: 'ar 8/7/2009 22:27'! openLabel: aString "Create a standard system view of the model, me, a StringHolder and open it. If in mvc, terminate the active controller so that the new window will immediately be activated." ^ToolBuilder open: self label: aString! ! !Model class methodsFor: 'toolbuilder' stamp: 'ct 12/21/2019 19:11'! open ^ self new open! ! !Model class methodsFor: 'toolbuilder' stamp: 'dtl 5/15/2011 20:46'! openLabel: aString ^self new openLabel: aString! ! TestRunner class removeSelector: #open! SystemReporter class removeSelector: #open! SMReleaseBrowser class removeSelector: #open! PluggableFileList class removeSelector: #open! FileList class removeSelector: #open! DependencyBrowser class removeSelector: #open! ChangeSorter class removeSelector: #open! StringHolder class removeSelector: #open! StringHolder class removeSelector: #openLabel:! ChangeSorter removeSelector: #open! StringHolder removeSelector: #openLabel:! SquitSettings class removeSelector: #open! SquitFeedback class removeSelector: #open! SquitBrowser class removeSelector: #open! SMLoaderPlus class removeSelector: #open! SLDefaultDialog removeSelector: #open! ProcessBrowser class removeSelector: #open! PointerFinder removeSelector: #open! MailComposition class removeSelector: #open! FontImporterTool class removeSelector: #open! FontChooserTool class removeSelector: #open! DualChangeSorter class removeSelector: #open! CommandShell class removeSelector: #open! CommandShell class removeSelector: #openLabel:! HelpBrowser removeSelector: #open! FontImporterTool removeSelector: #open! FontChooserTool removeSelector: #open! DualChangeSorter removeSelector: #open! !Model reorganize! ('copying' veryDeepFixupWith: veryDeepInner:) ('dependents' canDiscardEdits containingWindow hasUnacceptedEdits myDependents myDependents: topView) ('*services-base' requestor) ('*Tools' addItem: environment selectedClass spawn:) ('*morphic' step) ('user interface' windowActiveOnFirstClick) ('*Tools-keyboard' arrowKey:from:) ('*Tools-menus' trash trash:) ('*ShoutCore' hasBindingThatBeginsWith:) ('*Tools-pluggable menus' buildMenu:withBuilders:shifted: menu:for: menu:for:shifted: menuBuildersFor:in:shifted: menuPragmasFor:in: methodMenuPriority: sortMenuBuilders:) ('morphic ui' aboutToStyle: aboutToStyle:requestor: applyUserInterfaceTheme canApplyUserInterfaceTheme postAcceptBrowseFor: representsSameBrowseeAs:) ('*System-preferences' defaultWindowColor uniformWindowColor windowColorToUse) ('*51Deprecated' defaultBackgroundColor) ('toolbuilder' buildWindowWith: buildWindowWith:specs: labelString open openLabel: windowTitle) ('*Autocompletion' completionController completionControllerClass createCompletionController guessTypeForName: initializeCompletionController selectedClassOrMetaClass wantsAutocompletion wantsToCloseAutocompletion) ! CommandShellTranscript class removeSelector: #open! > |
Free forum by Nabble | Edit this page |