Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.546.mcz ==================== Summary ==================== Name: System-fbs.546 Author: fbs Time: 13 June 2013, 9:30:05.197 pm UUID: 1ac52877-c304-47f6-aedd-2047d7936645 Ancestors: System-fbs.544 Another step in breaking the System->MorphicExtras dependency: pull the ScrapsBook class variable out and store the global state in a new ScrapBook class. =============== Diff against System-fbs.544 =============== Item was changed: Object subclass: #Utilities instanceVariableNames: '' + classVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions UpdateDownloader UpdateUrlLists' - classVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions ScrapsBook UpdateDownloader UpdateUrlLists' poolDictionaries: '' category: 'System-Support'! !Utilities commentStamp: '<historical>' prior: 0! A repository for general and miscellaneous utilities; much of what is here are in effect global methods that don't naturally attach to anything else. 1/96 sw! Item was removed: - ----- Method: Utilities class>>addToTrash: (in category 'scraps') ----- - addToTrash: aMorph - "Paste the object onto a page of the system Trash book, unless the preference is set to empty the trash immediately." - - | aBook aPage | - Preferences preserveTrash ifFalse: [^ self]. - - aBook := self scrapsBook. - aMorph position: aBook pages first position + (0@40). - aBook pages do: [:pp | - (pp submorphs size = 1 and: [pp hasProperty: #trash]) ifTrue: "perhaps remove that property here" - ["page is blank" - ^ pp addMorph: aMorph]]. - aPage := aBook insertPageLabel: Time dateAndTimeNow printString - morphs: (Array with: aMorph). - aPage setProperty: #trash toValue: true! Item was removed: - ----- Method: Utilities class>>emptyScrapsBook (in category 'scraps') ----- - emptyScrapsBook - "Utilities emptyScrapsBook" - | oldScraps | - oldScraps := ScrapsBook. - ScrapsBook := nil. - self scrapsBook. "Creates it afresh" - (oldScraps notNil and: [oldScraps owner notNil]) - ifTrue: - [ScrapsBook position: oldScraps position. - oldScraps owner replaceSubmorph: oldScraps by: ScrapsBook. - ScrapsBook changed; layoutChanged]! Item was changed: ----- Method: Utilities class>>initialize (in category 'class initialization') ----- initialize + (self classVarNames includes: 'ScrapsBook') ifTrue: [self removeClassVarName: 'ScrapsBook'].! - "Initialize the class variables. 5/16/96 sw" - self initializeCommonRequestStrings. - RecentSubmissions := OrderedCollection new. - - self registerInFlapsRegistry. ! Item was removed: - ----- Method: Utilities class>>maybeEmptyTrash (in category 'scraps') ----- - maybeEmptyTrash - (self confirm: 'Do you really want to empty the trash?' translated) - ifTrue: [self emptyScrapsBook]! |
Free forum by Nabble | Edit this page |