Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.201.mcz ==================== Summary ==================== Name: ST80-mt.201 Author: mt Time: 12 April 2016, 7:42:10.072943 pm UUID: 318221b7-0676-3842-a01a-c0039d004bf8 Ancestors: ST80-mt.200 Reduce the use of globals in project classes. Clean-up code. =============== Diff against ST80-mt.200 =============== Item was changed: ----- Method: MVCProject>>addDeferredUIMessage: (in category 'scheduling') ----- addDeferredUIMessage: valuableObject "Arrange for valuableObject to be evaluated at a time when the user interface is in a coherent state." + world activeController - ScheduledControllers activeController ifNotNil: [:controller | controller addDeferredUIMessage: valuableObject]! Item was removed: - ----- Method: MVCProject>>addItem:toMenu:selection:requestor: (in category 'utilities') ----- - addItem: item toMenu: menu selection: action requestor: requestingProject - "Add a menu item representing this project to a menu being created by requestingProject" - - | color | - "Color to be used for this menu item, will be ignored if current project is MVC" - color := self world isInMemory - ifTrue: [Color veryVeryDarkGray] - ifFalse: [Color blue]. - "Menu item of type appropriate for current project" - requestingProject - addItem: item - toMenu: menu - selection: action - color: color - thumbnail: thumbnail! Item was added: + ----- Method: MVCProject>>color (in category 'accessing') ----- + color + + ^ self world isInMemory + ifTrue: [Color veryVeryDarkGray] + ifFalse: [Color blue]! Item was changed: ----- Method: MVCProject>>interruptName: (in category 'utilities') ----- interruptName: labelString "Create a Notifier on the active scheduling process with the given label." + ^ world interruptName: labelString - ^ ScheduledControllers interruptName: labelString ! Item was changed: ----- Method: MVCProject>>interruptName:preemptedProcess: (in category 'utilities') ----- interruptName: labelString preemptedProcess: theInterruptedProcess "Create a Notifier on the active scheduling process with the given label." + ^ world interruptName: labelString preemptedProcess: theInterruptedProcess - ^ ScheduledControllers interruptName: labelString preemptedProcess: theInterruptedProcess ! Item was changed: ----- Method: MVCProject>>resetDisplay (in category 'display') ----- resetDisplay "Bring the display to a usable state after handling primitiveError." + world searchForActiveController! - ScheduledControllers searchForActiveController! Item was changed: ----- Method: MVCProject>>restoreDisplay (in category 'display') ----- restoreDisplay "Clear the screen to gray and then redisplay all the scheduled views." Display extent = DisplayScreen actualScreenSize ifFalse: [DisplayScreen startUp. + world unCacheWindows]. + world restore! - ScheduledControllers unCacheWindows]. - ScheduledControllers restore! Item was changed: ----- Method: MVCProject>>saveState (in category 'enter') ----- saveState "Save the current state in me prior to leaving this project" changeSet := ChangeSet current. thumbnail ifNotNil: [thumbnail hibernate]. - world := ScheduledControllers. transcript := Transcript ! Item was changed: ----- Method: MVCProject>>scheduleProcessForEnter: (in category 'enter') ----- scheduleProcessForEnter: showZoom "Complete the enter: by launching a new process" | newProcess | SystemWindow clearTopWindow. "break external ref to this project" newProcess := [ + world resetActiveController. "in case of walkback in #restore" + showZoom ifFalse: [world restore]. + world searchForActiveController - ScheduledControllers resetActiveController. "in case of walkback in #restore" - showZoom ifFalse: [ScheduledControllers restore]. - ScheduledControllers searchForActiveController ] newProcess priority: Processor userSchedulingPriority. newProcess resume. "lose the current process and its referenced morphs" ! Item was changed: ----- Method: MVCProject>>setAsBackground: (in category 'utilities') ----- setAsBackground: aForm "Set aForm as a background image." + world screenController model form: aForm. - ScheduledControllers screenController model form: aForm. Display restoreAfter: []! Item was changed: ----- Method: MVCProject>>textWindows (in category 'utilities') ----- textWindows "Answer a dictionary of all system windows for text display keyed by window title. Generate new window titles as required to ensure unique keys in the dictionary." | aDict windows title | aDict := Dictionary new. + windows := world controllersSatisfying: - windows := ScheduledControllers controllersSatisfying: [:c | (c model isKindOf: StringHolder)]. windows do: [:aController | | textToUse aTextView | aTextView := aController view subViews detect: [:m | m isKindOf: PluggableTextView] ifNone: [nil]. textToUse := aTextView ifNil: [aController model contents] ifNotNil: [aTextView controller text]. "The latest edits, whether accepted or not" title := aController view label. (aDict includesKey: title) ifTrue: [ | newKey | "Ensure unique keys in aDict" (1 to: 100) detect: [:e | newKey := title, '-', e asString. (aDict includesKey: newKey) not]. title := newKey]. aDict at: title put: textToUse]. ^ aDict! Item was changed: ----- Method: MVCProject>>uiProcess (in category 'active process') ----- uiProcess + + ^ world activeControllerProcess! - ^ScheduledControllers activeControllerProcess! |
Free forum by Nabble | Edit this page |