Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.196.mcz ==================== Summary ==================== Name: System-ul.196 Author: ul Time: 12 December 2009, 2:50:45 am UUID: 3ad682cd-92a9-2944-9621-9f42a10fc7e7 Ancestors: System-bf.195 - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil: =============== Diff against System-bf.195 =============== Item was changed: ----- Method: Preferences class>>restorePersonalPreferences (in category 'personalization') ----- restorePersonalPreferences "Restore all the user's saved personal preference settings" | savedPrefs | savedPrefs := self parameterAt: #PersonalDictionaryOfPreferences ifAbsent: [^ self inform: 'There are no personal preferences saved in this image yet']. savedPrefs associationsDo: + [:assoc | (self preferenceAt: assoc key ifAbsent: [nil]) ifNotNil: - [:assoc | (self preferenceAt: assoc key ifAbsent: [nil]) ifNotNilDo: [:pref | pref preferenceValue: assoc value preferenceValue]]! Item was changed: ----- Method: SARInstaller class>>cardForSqueakMap: (in category 'SqueakMap') ----- cardForSqueakMap: aSqueakMap "Answer the current card or a new card." (aSqueakMap cardWithId: self squeakMapPackageID) + ifNotNil: [ :card | - ifNotNilDo: [ :card | (card installedVersion = self squeakMapPackageVersion) ifTrue: [ ^card ] ]. ^self newCardForSqueakMap: aSqueakMap ! Item was changed: ----- Method: Project>>makeThumbnail (in category 'menu messages') ----- makeThumbnail "Make a thumbnail image of this project from the Display." viewSize ifNil: [viewSize := Display extent // 8]. thumbnail := Form extent: viewSize depth: Display depth. (WarpBlt current toForm: thumbnail) sourceForm: Display; cellSize: 2; "installs a colormap" combinationRule: Form over; copyQuad: (Display boundingBox) innerCorners toRect: (0@0 extent: viewSize). + (Smalltalk at: #InternalThreadNavigationMorph) ifNotNil: [:tnMorph | - (Smalltalk at: #InternalThreadNavigationMorph) ifNotNilDo: [:tnMorph | tnMorph cacheThumbnailFor: self]. ^thumbnail ! Item was changed: ----- Method: Imports>>importImageDirectory: (in category 'icons') ----- importImageDirectory: directoryOrName | dir extensions forms | dir := directoryOrName isString ifFalse: [ directoryOrName ] ifTrue: [ FileDirectory default directoryNamed: directoryOrName ]. dir exists ifFalse: [self error: dir fullName , ' does not exist'. ^ #()]. extensions := (ImageReadWriter allTypicalFileExtensions add: 'form'; yourself) collect: [:ex | '.' , ex]. forms := OrderedCollection new. dir fileNames do: [:fileName | | fullName | (fileName endsWithAnyOf: extensions) ifTrue: [fullName := dir fullNameFor: fileName. (self importImageFromFileNamed: fullName) + ifNotNil: [:form | forms add: form]]]. - ifNotNilDo: [:form | forms add: form]]]. ^ forms! Item was changed: ----- Method: PseudoClass>>bindingOf: (in category 'testing method dictionary') ----- bindingOf: varName self exists ifTrue:[ + (self realClass bindingOf: varName) ifNotNil:[:binding| ^binding]. - (self realClass bindingOf: varName) ifNotNilDo:[:binding| ^binding]. ]. ^Smalltalk bindingOf: varName asSymbol! Item was changed: ----- Method: SystemChangeNotifier class>>resetUniqueInstance (in category 'private') ----- resetUniqueInstance "self resetUniqueInstance" UniqueInstance + ifNotNil: [:u | UniqueInstance releaseAll. - ifNotNilDo: [:u | UniqueInstance releaseAll. UniqueInstance := nil]! Item was changed: ----- Method: Preferences class>>loadPreferencesFrom: (in category 'personalization') ----- loadPreferencesFrom: aFileName | stream params dict desktopColor | stream := ReferenceStream fileNamed: aFileName. params := stream next. self assert: (params isKindOf: IdentityDictionary). params removeKey: #PersonalDictionaryOfPreferences. dict := stream next. self assert: (dict isKindOf: IdentityDictionary). desktopColor := stream next. stream close. dict keysAndValuesDo: + [:key :value | (self preferenceAt: key ifAbsent: [nil]) ifNotNil: - [:key :value | (self preferenceAt: key ifAbsent: [nil]) ifNotNilDo: [:pref | pref preferenceValue: value preferenceValue]]. params keysAndValuesDo: [ :key :value | self setParameter: key to: value ]. Smalltalk isMorphic ifTrue: [ World fillStyle: desktopColor ] ifFalse: [ self desktopColor: desktopColor. ScheduledControllers updateGray ]. ! Item was changed: ----- Method: SystemNavigation>>obsoleteMethodReferences (in category 'query') ----- obsoleteMethodReferences "SystemNavigation default obsoleteMethodReferences" "Open a browser on all referenced behaviors that are obsolete" | obsClasses obsRefs references | references := WriteStream on: Array new. obsClasses := self obsoleteBehaviors. 'Scanning for methods referencing obsolete classes' displayProgressAt: Sensor cursorPoint from: 1 to: obsClasses size during: [:bar | obsClasses keysAndValuesDo: [:index :each | bar value: index. obsRefs := Utilities pointersTo: each except: obsClasses. obsRefs do: [:ref | "Figure out if it may be a global" (ref isVariableBinding and: [ref key isString "or Symbol"]) ifTrue: [(Utilities pointersTo: ref) do: [:meth | (meth isKindOf: CompiledMethod) + ifTrue: [meth methodReference ifNotNil: [:mref | references nextPut: mref]]]]]]]. - ifTrue: [meth methodReference ifNotNilDo: [:mref | references nextPut: mref]]]]]]]. ^references contents! Item was changed: ----- Method: Project>>initializeProjectPreferences (in category 'project parameters') ----- initializeProjectPreferences "Initialize the project's preferences from currently-prevailing preferences that are currently being held in projects in this system" projectPreferenceFlagDictionary := Project current projectPreferenceFlagDictionary deepCopy. "Project overrides in the new project start out being the same set of overrides in the calling project" Preferences allPreferenceObjects do: "in case we missed some" [:aPreference | aPreference localToProject ifTrue: [(projectPreferenceFlagDictionary includesKey: aPreference name) ifFalse: [projectPreferenceFlagDictionary at: aPreference name put: aPreference preferenceValue]]]. + (Project current projectParameterAt: #disabledGlobalFlapIDs ifAbsent: [nil]) ifNotNil: - (Project current projectParameterAt: #disabledGlobalFlapIDs ifAbsent: [nil]) ifNotNilDo: [:idList | self projectParameterAt: #disabledGlobalFlapIDs put: idList copy] ! Item was changed: ----- Method: SARInstaller>>getMCBootstrapLoaderClass (in category 'client services') ----- getMCBootstrapLoaderClass ^Smalltalk at: #MCBootstrapLoader ifAbsent: [(self memberNamed: 'MCBootstrapLoader.st') + ifNotNil: [:m | self fileInMemberNamed: m. - ifNotNilDo: [:m | self fileInMemberNamed: m. Smalltalk at: #MCBootstrapLoader ifAbsent: []]]! Item was changed: ----- Method: Project>>validateProjectNameIfOK: (in category 'menu messages') ----- validateProjectNameIfOK: aBlock | details | details := world valueOfProperty: #ProjectDetails. details ifNotNil: ["ensure project info matches real project name" details at: 'projectname' put: self name. ]. self doWeWantToRename ifFalse: [^aBlock value]. + (Smalltalk at: #EToyProjectDetailsMorph) ifNotNil: [:etpdm | - (Smalltalk at: #EToyProjectDetailsMorph) ifNotNilDo: [:etpdm | etpdm getFullInfoFor: self ifValid: [ World displayWorldSafely. aBlock value. ] fixTemps expandedFormat: false] ! |
Free forum by Nabble | Edit this page |