'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #278] on 31 August 2004 at 5:36:02 pm'! "Change Set: FlexibleVocabulariesPreload-nk Date: 21 August 2004 Author: Ned Konz / (disconnected by Marcus Denker + Bert Freudenberg) Method stubs required to be loaded before FlexibleVocabularies-nk.*.mcz "! !Morph class methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/20/2004 16:36'! allAdditionsToViewerCategories "Answer a Dictionary of ( ) that characterizes the phrases this kind of morph wishes to add to various Viewer categories. This version factors each category definition into a separate method. Subclasses that have additions can either: - override #additionsToViewerCategories, or - (preferably) define one or more additionToViewerCategory* methods. The advantage of the latter technique is that class extensions may be added by external packages without having to re-define additionsToViewerCategories. " "Morph allAdditionsToViewerCategories size" | dict | dict _ IdentityDictionary new. (self class includesSelector: #additionsToViewerCategories) ifTrue: [self additionsToViewerCategories do: [:group | group pairsDo: [:key :list | (dict at: key ifAbsentPut: [OrderedCollection new]) addAll: list]]]. self additionToViewerCategorySelectors do: [ :aSelector | (self perform: aSelector) pairsDo: [ :key :list | (dict at: key ifAbsentPut: [ OrderedCollection new ]) addAll: list ]]. ^dict ! ! !Morph class methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/20/2004 16:36'! noteCompilationOf: aSelector meta: isMeta "Any change to an additionsToViewer... method can invalidate existing etoy vocabularies. The #respondsTo: test is to allow loading the FlexibleVocabularies change set without having to worry about method ordering." "do nothing because this is just the preload." super noteCompilationOf: aSelector meta: isMeta! ! !StandardScriptingSystem class methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/20/2004 16:36'! noteCompilationOf: aSelector meta: isMeta "Any change to an additionsToViewer... method can invalidate existing etoy vocabularies. The #respondsTo: test is to allow loading the FlexibleVocabularies change set without having to worry about method ordering." "do nothing because this is just the preload." super noteCompilationOf: aSelector meta: isMeta! ! 'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #293] on 2 September 2004 at 9:54:10 am'! "Change Set: TextMorphSelectionAndFocusFixes-sw-nk Date: 31 August 2004 Author: Ned Konz Scott's 'textSelectionFix-sw' with a fix, and an addition to avoid invalidation of excessively large areas. Scott's comment: Assures that the multiple-visible-selection regime of update 5849TextmorphSelectionFix-rr is confined to TextMorphs seen in windows; for loose TextMophs, the former behavior is restored. " ! !TextMorph methodsFor: 'event handling' stamp: 'nk 8/29/2004 21:29'! keyboardFocusChange: aBoolean | w | paragraph isNil ifFalse:[paragraph focused: aBoolean]. aBoolean ifTrue: ["A hand is wanting to send us characters..." self hasFocus ifFalse: [self editor "Forces install"]] ifFalse: ["A hand has clicked elsewhere..." (w := self world) isNil ifFalse: [w handsDo: [:h | h keyboardFocus == self ifTrue: [^self]]. "Release control unless some hand is still holding on" self releaseEditor]]! ! !TextMorph methodsFor: 'private' stamp: 'nk 8/29/2004 21:40'! selectionChanged "Invalidate all the selection rectangles. Make sure that any drop shadow is accounted for too." self paragraph selectionRects do: [:r | self invalidRect: (self expandFullBoundsForDropShadow: (r intersect: self fullBounds))]! ! !TextMorphForEditView methodsFor: 'event handling' stamp: 'sw 8/29/2004 23:09'! keyboardFocusChange: aBoolean "rr 3/21/2004 22:55 : removed the #ifFalse: branch, which was responsible of the deselection of text when the paragraph lost focus. This way selection works in a more standard way, and this permits the menu keyboard control to be really effective" paragraph isNil ifFalse:[paragraph focused: aBoolean]. aBoolean ifTrue: ["A hand is wanting to send us characters..." self hasFocus ifFalse: [self editor "Forces install"]]. self changed. ! ! 'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #293] on 2 September 2004 at 9:55:45 am'! "Change Set: Misc293Fixes-nk Date: 2 September 2004 Author: Ned Konz Fixes for 0293 Squeakland images. "! !Object methodsFor: 'macpal' stamp: 'nk 9/1/2004 10:41'! currentHand "Return a usable HandMorph -- the one associated with the object's current environment. This method will always return a hand, even if it has to conjure one up as a last resort. If a particular hand is actually handling events at the moment (such as a remote hand or a ghost hand), it will be returned." ^ActiveHand ifNil: [ self currentWorld primaryHand ]! ! !ChangeList class methodsFor: 'fileIn/Out' stamp: 'nk 8/31/2004 08:59'! browseCompressedChangesFile: fullName "Browse the selected file in fileIn format." | zipped unzipped stream | fullName ifNil: [^Beeper beep]. stream := FileStream readOnlyFileNamed: fullName. stream converter: Latin1TextConverter new. zipped := GZipReadStream on: stream. unzipped := zipped contents asString. stream := (MultiByteBinaryOrTextStream with: unzipped) reset. ChangeList browseStream: stream! ! !HaloMorph methodsFor: 'private' stamp: 'nk 9/2/2004 09:18'! doGrow: evt with: growHandle "Called while the mouse is down in the grow handle" | newExtent extentToUse | evt hand obtainHalo: self. newExtent _ (target pointFromWorld: (target griddedPoint: evt cursorPoint - positionOffset)) - target topLeft. evt shiftPressed ifTrue: [newExtent _ (newExtent x max: newExtent y) asPoint]. (newExtent x < 1 or: [newExtent y < 1 ]) ifTrue: [^ self]. target renderedMorph setExtentFromHalo: (extentToUse _ newExtent). growHandle position: evt cursorPoint - (growHandle extent // 2). self layoutChanged. (self valueOfProperty: #commandInProgress) ifNotNilDo: [:cmd | "Update the final extent" cmd redoTarget: target selector: #setExtentFromHalo: argument: extentToUse] ! ! !JoystickMorph methodsFor: 'menu' stamp: 'nk 8/31/2004 08:59'! chooseJoystickNumber "Allow the user to select a joystick number" | result aNumber str | str := self lastRealJoystickIndex asString. result := FillInTheBlank request: 'Joystick device number (currently ' translated , str , ')' initialAnswer: str. [aNumber := result asNumber] on: Error do: [:err | ^self beep]. (aNumber > 0 and: [aNumber <= 32]) ifFalse: ["???" ^Beeper beep]. realJoystickIndex := aNumber. self setProperty: #lastRealJoystickIndex toValue: aNumber. self startStepping! ! !PartsBin methodsFor: 'initialization' stamp: 'nk 9/1/2004 20:09'! listDirection: aListDirection quadList: quadList buttonClass: buttonClass "Initialize the receiver to run horizontally or vertically, obtaining its elements from the list of tuples of the form: (