Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.462.mcz ==================== Summary ==================== Name: Morphic-nice.462 Author: nice Time: 28 August 2010, 1:07:41.985 am UUID: 46f84d84-81fc-1d47-adb1-8ab7f029b8a9 Ancestors: Morphic-ul.461 Minor #ifNil: simplification from Cuis correct #lastSelection though never sent =============== Diff against Morphic-ul.461 =============== Item was changed: ----- Method: ScrollBar>>waitForDelay1:delay2: (in category 'scroll timing') ----- waitForDelay1: delay1 delay2: delay2 "Return true if an appropriate delay has passed since the last scroll operation. The delay decreases exponentially from delay1 to delay2." | now scrollDelay | + timeOfLastScroll ifNil: [self resetTimer]. "Only needed for old instances" - timeOfLastScroll isNil ifTrue: [self resetTimer]. "Only needed for old instances" now := Time millisecondClockValue. (scrollDelay := currentScrollDelay) isNil ifTrue: [scrollDelay := delay1 "initial delay"]. currentScrollDelay := scrollDelay * 9 // 10 max: delay2. "decrease the delay" timeOfLastScroll := now. ^true! Item was changed: ----- Method: GrafPort>>copyBits (in category 'copying') ----- copyBits "Override copybits to do translucency if desired" (combinationRule >= 30 and: [combinationRule <= 31]) + ifTrue: [ + self copyBitsTranslucent: (alpha ifNil: [255])] - ifTrue: - [alpha isNil - ifTrue: [self copyBitsTranslucent: 255] - ifFalse: [self copyBitsTranslucent: alpha]] ifFalse: [super copyBits]! Item was changed: ----- Method: Morph>>colorString: (in category 'printing') ----- colorString: aColor + aColor ifNil: [^'nil']. - aColor isNil ifTrue: [^'nil']. Color colorNames do: [:colorName | aColor = (Color perform: colorName) ifTrue: [^'Color ' , colorName]]. ^aColor storeString! Item was changed: ----- Method: PluggableListMorph>>doubleClick: (in category 'events') ----- doubleClick: event | index | + doubleClickSelector ifNil: [^super doubleClick: event]. - doubleClickSelector isNil ifTrue: [^super doubleClick: event]. index := self rowAtLocation: event position. index = 0 ifTrue: [^super doubleClick: event]. "selectedMorph ifNil: [self setSelectedMorph: aMorph]." ^ self model perform: doubleClickSelector! Item was changed: ----- Method: Morph>>formerOwner: (in category 'dropping/grabbing') ----- formerOwner: aMorphOrNil + aMorphOrNil + ifNil: [self removeProperty: #formerOwner] + ifNotNil: [self setProperty: #formerOwner toValue: aMorphOrNil]! - aMorphOrNil isNil - ifTrue: [self removeProperty: #formerOwner] - ifFalse: [self setProperty: #formerOwner toValue: aMorphOrNil]! Item was changed: ----- Method: PolygonMorph>>computeNextToEndPoints (in category 'smoothing') ----- computeNextToEndPoints | pointAfterFirst pointBeforeLast | pointAfterFirst := nil. self lineSegmentsDo: [:p1 :p2 | + pointAfterFirst ifNil: [pointAfterFirst := p2 asIntegerPoint]. - pointAfterFirst isNil ifTrue: [pointAfterFirst := p2 asIntegerPoint]. pointBeforeLast := p1 asIntegerPoint]. curveState at: 2 put: pointAfterFirst. curveState at: 3 put: pointBeforeLast! Item was changed: ----- Method: Morph>>formerPosition: (in category 'dropping/grabbing') ----- formerPosition: formerPosition + formerPosition + ifNil: [self removeProperty: #formerPosition] + ifNotNil: [self setProperty: #formerPosition toValue: formerPosition]! - formerPosition isNil - ifTrue: [self removeProperty: #formerPosition] - ifFalse: [self setProperty: #formerPosition toValue: formerPosition]! Item was changed: ----- Method: PluggableTextMorph>>getText (in category 'model access') ----- getText "Retrieve the current model text" | newText | + getTextSelector ifNil: [^Text new]. - getTextSelector isNil ifTrue: [^Text new]. newText := model perform: getTextSelector. newText ifNil: [^Text new]. ^newText shallowCopy! Item was changed: ----- Method: PasteUpMorph>>world (in category 'structure') ----- world + worldState ifNil: [^super world]. - worldState isNil ifTrue: [^super world]. ^self! Item was changed: ----- Method: PluggableTextMorph>>getSelection (in category 'model access') ----- getSelection "Answer the model's selection interval." + getSelectionSelector ifNil: [^1 to: 0]. "null selection" - getSelectionSelector isNil ifTrue: [^1 to: 0]. "null selection" ^model perform: getSelectionSelector! Item was changed: ----- Method: MenuMorph>>lastSelection (in category 'accessing') ----- lastSelection "Return the label of the last selected item or nil." + ^selectedItem ifNotNil: [selectedItem selector]! - selectedItem isNil ifTrue: [^selectedItem selector] ifFalse: [^nil]! Item was changed: ----- Method: MenuItemMorph>>contentString: (in category 'accessing') ----- contentString: aString + aString + ifNil: [self removeProperty: #contentString] + ifNotNil: [self setProperty: #contentString toValue: aString]! - aString isNil - ifTrue: [self removeProperty: #contentString] - ifFalse: [self setProperty: #contentString toValue: aString]! Item was changed: ----- Method: MorphicAlarm>>value: (in category 'evaluating') ----- value: anArgument | nArgs | numArgs ifNil:[numArgs := selector numArgs]. nArgs := arguments ifNil:[0] ifNotNil:[arguments size]. nArgs = numArgs ifTrue:[ "Ignore extra argument" ^self value]. + ^arguments + ifNil: [ receiver perform: selector with: anArgument] + ifNotNil: [ receiver perform: selector withArguments: (arguments copyWith: anArgument)]! - ^arguments isNil - ifTrue: [receiver perform: selector with: anArgument] - ifFalse: [receiver perform: selector withArguments: (arguments copyWith: anArgument)]! Item was changed: ----- Method: MorphExtension>>privateOtherProperties: (in category 'accessing - other properties') ----- + privateOtherProperties: anIdentityDictionary - privateOtherProperties: anIndentityDictionary "private - change the receiver's otherProperties" + otherProperties := anIdentityDictionary ! - otherProperties := anIndentityDictionary ! Item was changed: ----- Method: PluggableListMorph>>getCurrentSelectionIndex (in category 'model access') ----- getCurrentSelectionIndex "Answer the index of the current selection." + getIndexSelector ifNil: [^0]. - getIndexSelector isNil ifTrue: [^0]. ^model perform: getIndexSelector! Item was changed: ----- Method: TextEditor>>replaceSelectionWith: (in category 'accessing') ----- replaceSelectionWith: aText "Remember the selection text in UndoSelection. Deselect, and replace the selection text by aText. Remember the resulting selectionInterval in UndoInterval and PriorInterval. Set up undo to use UndoReplace." + beginTypeInBlock ifNotNil: [^self zapSelectionWith: aText]. "called from old code" - beginTypeInBlock ~~ nil ifTrue: [^self zapSelectionWith: aText]. "called from old code" UndoSelection := self selection. self zapSelectionWith: aText. self undoer: #undoReplace! Item was changed: ----- Method: HaloMorph>>containsPoint: (in category 'geometry testing') ----- containsPoint: aPoint "This method is overridden so that, once up, the handles will stay up as long as the mouse is within the box that encloses all the handles even if it is not over any handle or over its owner." + ^target + ifNil: [super containsPoint: aPoint] + ifNotNil: [false]! - target isNil ifTrue: [^super containsPoint: aPoint] ifFalse: [^false]! Item was changed: ----- Method: TextMorph>>privateMoveBy: (in category 'geometry') ----- privateMoveBy: delta super privateMoveBy: delta. + editor + ifNil: [ paragraph ifNotNil: [paragraph moveBy: delta]] + ifNotNil: [ + "When moving text with an active editor, save and restore all state." - editor isNil - ifTrue: [paragraph ifNotNil: [paragraph moveBy: delta]] - ifFalse: - ["When moving text with an active editor, save and restore all state." - paragraph moveBy: delta. self installEditorToReplace: editor]! Item was changed: ----- Method: PluggableButtonMorph>>getModelState (in category 'private') ----- getModelState "Answer the result of sending the receiver's model the getStateSelector message." + ^ getStateSelector + ifNil: [false] + ifNotNil: [model perform: getStateSelector]! - ^ getStateSelector isNil - ifTrue: [false] - ifFalse: [model perform: getStateSelector]! |
Free forum by Nabble | Edit this page |