[Pkg] The Trunk: MorphicExtras-ul.102.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 4 01:12:56 UTC 2011
Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.102.mcz
==================== Summary ====================
Name: MorphicExtras-ul.102
Author: ul
Time: 3 August 2011, 1:50:12.221 am
UUID: edaf8f97-595d-dd4b-b262-913b828c645c
Ancestors: MorphicExtras-cmm.101
Removed unnecessary blocks.
=============== Diff against MorphicExtras-cmm.101 ===============
Item was changed:
----- Method: Command>>parameterAt:ifAbsent: (in category 'parameters') -----
parameterAt: aSymbol ifAbsent: aBlock
"Answer the parameter stored at the aSymbol, but if none, return the result of evaluating aBlock"
+ ^ self assuredParameterDictionary at: aSymbol ifAbsent: aBlock!
- ^ self assuredParameterDictionary at: aSymbol ifAbsent: [aBlock value]!
Item was changed:
----- Method: Flaps class>>addMorph:asElementNumber:inGlobalFlapSatisfying: (in category 'construction support') -----
addMorph: aMorph asElementNumber: aNumber inGlobalFlapSatisfying: flapBlock
"If any global flap satisfies flapBlock, add aMorph to it at the given position. Applies to flaps that are parts bins and that like thumbnailing"
| aFlapTab flapPasteUp |
+ aFlapTab := self globalFlapTabsIfAny detect: flapBlock ifNone: [^ self].
- aFlapTab := self globalFlapTabsIfAny detect: [:aTab | flapBlock value: aTab] ifNone: [^ self].
flapPasteUp := aFlapTab referent.
flapPasteUp addMorph: aMorph asElementNumber: aNumber.
flapPasteUp replaceTallSubmorphsByThumbnails; setPartsBinStatusTo: true!
Item was changed:
----- Method: Flaps class>>deleteMorphsSatisfying:fromGlobalFlapSatisfying: (in category 'construction support') -----
deleteMorphsSatisfying: deleteBlock fromGlobalFlapSatisfying: flapBlock
"If any global flap satisfies flapBlock, then delete objects satisfying from deleteBlock from it. Occasionally called from do-its in updates or other fileouts."
| aFlapTab flapPasteUp |
+ aFlapTab := self globalFlapTabsIfAny detect: flapBlock ifNone: [^ self].
- aFlapTab := self globalFlapTabsIfAny detect: [:aTab | flapBlock value: aTab] ifNone: [^ self].
flapPasteUp := aFlapTab referent.
flapPasteUp submorphs do:
[:aMorph | (deleteBlock value: aMorph) ifTrue: [aMorph delete]]!
Item was changed:
----- Method: Flaps class>>replacePartSatisfying:inGlobalFlapSatisfying:with: (in category 'replacement') -----
replacePartSatisfying: elementBlock inGlobalFlapSatisfying: flapBlock with: replacement
"If any global flap satisfies flapBlock, look in it for a part satisfying elementBlock; if such a part is found, replace it with the replacement morph, make sure the flap's layout is made right, etc."
| aFlapTab flapPasteUp anElement |
+ aFlapTab := self globalFlapTabsIfAny detect: flapBlock ifNone: [^ self].
- aFlapTab := self globalFlapTabsIfAny detect: [:aTab | flapBlock value: aTab] ifNone: [^ self].
flapPasteUp := aFlapTab referent.
+ anElement := flapPasteUp submorphs detect: elementBlock ifNone: [^ self].
- anElement := flapPasteUp submorphs detect: [:aMorph | elementBlock value: aMorph] ifNone: [^ self].
flapPasteUp replaceSubmorph: anElement by: replacement.
flapPasteUp replaceTallSubmorphsByThumbnails; setPartsBinStatusTo: true.
"Flaps replacePartSatisfying: [:el | (el isKindOf: MorphThumbnail) and: [(el morphRepresented isKindOf: SystemWindow) and: [el morphRepresented label = 'scripting area']]]
inGlobalFlapSatisfying: [:fl | (fl submorphs size > 0) and: [(fl submorphs first isKindOf: TextMorph) and: [(fl submorphs first contents string copyWithout: Character cr) = 'Tools']]] with: ScriptingSystem newScriptingSpace"!
More information about the Packages
mailing list