[etoys-dev] Etoys Inbox: Skeleton-Richo.5.mcz

Ricardo Moran richi.moran at gmail.com
Tue Oct 18 11:59:30 EDT 2011


Hi, it seems my commit notifications are being marked as spam :S

But anyway, I'm glad to know you took the time to clean the Skeleton
project. It's one step closer to inclusion :)
I tried to fix the layout problem that Karl mentioned before and this is my
first shot. I think the result is nice, although I had to create a new morph
subclass (which I don't really like much).

Cheers,
Richo


On Tue, Oct 18, 2011 at 12:50 PM, <commits at source.squeak.org> wrote:

> Spam detection software, running on the system "europa.mgmt.inetu.net",
> has
> identified this incoming email as possible spam.  The original message
> has been attached to this so you can view it (if it isn't spam) or label
> similar future email.  If you have any questions, see
> the administrator of that system for details.
>
> Content preview:  Ricardo Moran uploaded a new version of Skeleton to
> project
>   Etoys Inbox: http://source.squeak.org/etoysinbox/Skeleton-Richo.5.mcz====================
>   Summary ==================== Name: Skeleton-Richo.5 Author: Richo Time:
> 18
>   October 2011, 12:50:19 pm UUID: 2d68a228-e98a-b64c-af4f-48ae0cb56a9c
> Ancestors:
>   Skeleton-kfr.4 [...]
>
> Content analysis details:   (6.5 points, 5.0 required)
>
>  pts rule name              description
> ---- ----------------------
> --------------------------------------------------
>  3.5 BAYES_99               BODY: Bayesian spam probability is 99 to 100%
>                            [score: 1.0000]
>  0.0 MISSING_MID            Missing Message-Id: header
>  1.2 INVALID_DATE           Invalid Date: header (not RFC 2822)
>  1.0 DATE_IN_PAST_12_24     Date: is 12 to 24 hours before Received: date
>  1.7 TVD_FUZZY_SYMBOL       BODY: TVD_FUZZY_SYMBOL
>  3.8 TVD_STOCK1             BODY: TVD_STOCK1
>  0.1 RDNS_NONE              Delivered to trusted network by a host with no
> rDNS
> -4.8 AWL                    AWL: From: address is in the auto white-list
>
>
>
>
> ---------- Forwarded message ----------
> From: commits at source.squeak.org
> To: etoys-dev at squeakland.org
> Date: Tue, 18 Oct 2011 15:50:20.809 0000
> Subject: Etoys Inbox: Skeleton-Richo.5.mcz
> Ricardo Moran uploaded a new version of Skeleton to project Etoys Inbox:
> http://source.squeak.org/etoysinbox/Skeleton-Richo.5.mcz
>
> ==================== Summary ====================
>
> Name: Skeleton-Richo.5
> Author: Richo
> Time: 18 October 2011, 12:50:19 pm
> UUID: 2d68a228-e98a-b64c-af4f-48ae0cb56a9c
> Ancestors: Skeleton-kfr.4
>
> Trying to fix the layout problem with the tick morph and the sheet's name.
> I renamed SkSheetMorph to SkBasicSheetMorph and I removed all the code that
> adds page controls and draws its name. So now it is a simple spreadsheet.
> I then created a new SkSheetMorph that decorates a SkBasicSheetMorph with
> the page controls and a title.
>
> I also removed the reference to Connectors in
> Morph>>#showPointArrowFrom:to:label: because it gave a DNU that I didn't
> knew how to fix it, and because it doesn't seem to be really important
> behavior.
>
> =============== Diff against Skeleton-kfr.4 ===============
>
> Item was changed:
>  ----- Method: Morph>>showPointArrowFrom:to:label: (in category
> '*skeleton-base-arrow') -----
>  showPointArrowFrom: morph1 to: morph2 label: aString
>        "Morph new showPointArrowFrom: (Morph new position: 0 at 0) to: (Morph
>        new position: 200 at 200) label: 'test'"
>        | p1 p2 arrow label connector |
>        p1 := morph1 center.
>        p2 := morph2 center.
>        arrow := PolygonMorph arrowPrototype.
>        arrow
>                borderColor: (TranslucentColor
>                                r: 1.0
>                                g: 0.3
>                                b: 0.0
>                                alpha: 0.6).
>        arrow
>                setVertices: (Array with: p1 with: p2).
>        arrow dashedBorder: {30. 30. Color transparent. 0. -10};
>                 startStepping.
> -       (Smalltalk
> -               at: #NCAAConnectorMorph
> -               ifAbsent: [])
> -               ifNotNil: [connector := NCAAConnectorMorph fromMorph:
> morph1 toMorph: morph2.
> -                       connector line: arrow.
> -                       connector lock.
> -                       label := NCLabelMorph new string: aString.
> -                       label input: morph1.
> -                       label color: Color red.
> -                       label openInWorld.
> -                       arrow := connector].
>        arrow openInWorld.
> +       arrow addAlarm: #delete after: 500!
> -       arrow addAlarm: #delete after: 500.
> -       label ifNotNil: [label addAlarm: #delete after: 500]
> - !
>
> Item was changed:
>  ----- Method: Player>>setTotalColumns: (in category
> '*skeleton-spreadsheet') -----
>  setTotalColumns: aNumber
> +       ^ self sheetMorph area: (0 at 0 corner: (aNumber max: 2) @ self
> getTotalRows)!
> -       ^ self sheetMorph area: (0 at 0 corner: aNumber @ self getTotalRows)!
>
> Item was changed:
>  ----- Method: Player>>setTotalRows: (in category '*skeleton-spreadsheet')
> -----
>  setTotalRows: aNumber
> +       ^ self sheetMorph area: (0 at 0 corner: self getTotalColumns @
> (aNumber max: 2))!
> -       ^ self sheetMorph area: (0 at 0 corner: self getTotalColumns @
> aNumber)!
>
> Item was added:
> + SkGridMorph subclass: #SkBasicSheetMorph
> +       instanceVariableNames: 'history model selectionMorph dropZone
> showFormula'
> +       classVariableNames: ''
> +       poolDictionaries: ''
> +       category: 'Skeleton-Base'!
> +
> + !SkBasicSheetMorph commentStamp: 'tak 12/11/2003 19:10' prior: 0!
> + I am a presentation compornent for showing as 2-D grid.
> + The contents what I show is depended on a model.
> + I never access to a cell directly except through model because
> + a cell doesn't know where he locates. Basically, Position information is
> + only in model.
> +
> + cellArea              Rectangle -- the area of cells for drawing. Actual
> size of table is cellArea extent.
> + model         SkSheet --
> + !
>
> Item was added:
> + ----- Method: SkBasicSheetMorph class>>additionsToViewerCategories (in
> category 'viewer categories') -----
> + additionsToViewerCategories
> + ^ #(
> + (#spreadsheet (
> + #(command clearTable 'Deletes the contents of all cells')
> + #(command clearRow 'Deletes the contents of the current row cells' )
> + #(command clearColumn 'Deletes the contents of the current columns cells'
> )
> + #(slot totalRows 'Lets you change the amount of rows in the spreadsheet'
> Number readWrite Player getTotalRows Player setTotalRows:  )
> + #(slot totalColumns 'Lets you change the amount of columns in the
> spreadsheet' Number readWrite Player getTotalColumns Player setTotalColumns:
>  )
> + #(slot rowIndex 'Sets the current row' Number readWrite Player
> getRowIndex Player setRowIndex:  )
> + #(slot columnIndex 'Sets the current column' Number readWrite Player
> getColumnIndex Player setColumnIndex:  )
> + #(slot currentCharacters 'Lets you read and modify the characters of the
> current cell' String readWrite Player getCurrentCharacters Player
> setCurrentCharacters:  )
> + #(slot currentNumericValue 'Lets you read and modify the numeric value of
> the current cell' Number readWrite Player getCurrentNumericValue Player
> setCurrentNumericValue:  )
> + ))
> +
> + (#'data i/o' (
> + #(slot writeMode 'Lets you choose a write mode (overwrite or append)'
> WriteMode readWrite Player getWriteMode Player setWriteMode:  )
> + #(slot csvSeparator 'Lets you choose a character to act as a separator
> between cells' String readWrite Player getCsvSeparator Player
> setCsvSeparator:  )
> + #(slot csvFileName 'Sets the name of the file to import/export data'
> String readWrite Player getCsvFileName Player setCsvFileName:  )
> + #(command importDataFromFile 'Reads the data from the file and loads it
> in the spreadsheet')
> + #(command exportDataToFile 'Writes the data from the spreadsheet into the
> file')
> + ))
> +
> + )!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph class>>initialize (in category 'class
> initialization') -----
> + initialize
> +       "
> +       self initialize.
> +       "
> +       Vocabulary addStandardVocabulary: (SymbolListType new
> vocabularyName: #WriteMode;
> +                        symbols: #(#overwrite #append)).!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph class>>model: (in category 'instance
> creation') -----
> + model: aSkObject
> +       ^ super new model: aSkObject!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>acceptDroppingMorph:event: (in category
> 'drag and drop') -----
> + acceptDroppingMorph: aMorph event: evt
> +       | cellPos successed |
> +       cellPos _ self screenToCell: aMorph topLeft.
> +       (cellPos x < 1
> +                       or: [cellPos y < 1])
> +               ifTrue: [self beep: 'arrow'.
> +                       ^ aMorph rejectDropMorphEvent: evt].
> +       successed _ false.
> +       successed _ (aMorph isKindOf: SkGridPartsMorph)
> +                               ifTrue: [self acceptRuleMorph: aMorph
> event: evt]
> +                               ifFalse: [aMorph class = PhraseTileMorph
> +                                               ifTrue: [self
> acceptPhraseTileMorph: aMorph event: evt]
> +                                               ifFalse: [aMorph class =
> TileMorph
> +                                                               ifTrue:
> [self acceptTileMorph: aMorph event: evt]]].
> +       successed
> +               ifTrue: [self beep: 'cassete']
> +               ifFalse: [self beep: 'arrow'.
> +                       aMorph rejectDropMorphEvent: evt]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>acceptPhraseTileMorph:event: (in
> category 'drag and drop') -----
> + acceptPhraseTileMorph: aMorph event: evt
> +       | setter getter |
> +       getter _ aMorph operatorTile operatorOrExpression.
> +       setter _ ('set'
> +                               , (getter allButFirst: 3) , ':') asSymbol.
> +       self model
> +               modelAt: (self screenToCell: aMorph topLeft)
> +               for: aMorph actualObject
> +               getter: getter
> +               setter: setter.
> +       ^ true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>acceptRuleMorph:event: (in category
> 'drag and drop') -----
> + acceptRuleMorph: aMorph event: evt
> +       | cellPos card |
> +       model parent adopt: aMorph model rule.
> +       cellPos _ (self screenToCell: aMorph topLeft)
> +                               + (aMorph cellOrigin - aMorph area
> topLeft).
> +       self model textAt: cellPos put: '=' , aMorph model codeString.
> +       card _ self
> +                               cardMorphAt: cellPos
> +                               ifAbsent: [^ false].
> +       card model rule = aMorph model rule
> +               ifFalse: ["maybe successed"
> +                       ^ false].
> +       aMorph halo
> +               ifNotNilDo: [:halo | halo setTarget: card].
> +       ^ true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>acceptTileMorph:event: (in category
> 'drag and drop') -----
> + acceptTileMorph: aMorph event: evt
> +       | object |
> +       object _ aMorph actualObject.
> +       self model
> +               at: (self screenToCell: aMorph topLeft)
> +               put: object.
> +       ^ true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>areaChanged (in category 'layout') -----
> + areaChanged
> +       super areaChanged.
> +       self
> +               submorphsDo: [:m | (m isKindOf: SkGridMorph)
> +                               ifTrue: [m areaChanged]]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>cardMorphAt:ifAbsent: (in category
> 'accessing') -----
> + cardMorphAt: aPoint ifAbsent: aBlock
> +       ^ self submorphs
> +               detect: [:m | m class = SkCardMorph
> +                               and: [m cellOrigin = aPoint]]
> +               ifNone: aBlock!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>cellExtentAt: (in category 'layout')
> -----
> + cellExtentAt: aPoint
> +       | cellExtent x y |
> +       ^ (model notNil
> +                       and: [(cellExtent _ model findName: self
> cellExtentName) class == SkSheet ])
> +               ifTrue: [x _ (cellExtent
> +                                               at: aPoint x @ 1
> +                                               ifAbsent: [SkGridMorph
> standardCellExtent]) x.
> +                       y _ (cellExtent
> +                                               at: 1 @ aPoint y
> +                                               ifAbsent: [SkGridMorph
> standardCellExtent]) y.
> +                       x @ y]
> +               ifFalse: [SkGridMorph standardCellExtent]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>cellExtentName (in category 'layout')
> -----
> + cellExtentName
> +       ^ 'CellExtent'!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>copySelection (in category 'action')
> -----
> + copySelection
> +       | text |
> +       text _ Text
> +                               streamContents: [:aStream | self selection
> top
> +                                               to: self selection bottom -
> 1
> +                                               do: [:y |
> +                                                       (self selection
> left to: self selection right - 1)
> +                                                               do: [:x |
> aStream
> +
>     nextPutAll: (model textAt: x @ y)]
> +
> separatedBy: [aStream nextPut: Character tab].
> +                                                       aStream nextPut:
> Character cr]].
> +       Clipboard clipboardText: text!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>cut (in category 'action') -----
> + cut
> +       self copySelection.
> +       self selection top
> +               to: self selection bottom - 1
> +               do: [:y | self selection left
> +                               to: self selection right - 1
> +                               do: [:x | model textAt: x @ y put: '']]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>drawCell:at: (in category 'drawing')
> -----
> + drawCell: aCanvas at: aPoint
> +       (aPoint x isZero
> +                       or: [aPoint y isZero])
> +               ifTrue: [^ self
> +                               drawLabel: aCanvas
> +                               string: (self labelAt: aPoint)
> +                               at: aPoint].
> +       self flag: #TODO.
> +       self
> +               drawContents: ((showFormula notNil
> +                                       and: [showFormula])
> +                               ifTrue: [model textAt: aPoint]
> +                               ifFalse: [ showFormula _ false.model at:
> aPoint.])
> +               on: aCanvas
> +               at: aPoint!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>drawOn: (in category 'drawing') -----
> + drawOn: aCanvas
> +       super drawOn: aCanvas.
> +       dropZone
> +               ifNotNil: [aCanvas
> +                               fillRectangle: (self
> +                                               cellAreaToScreen: (dropZone
> intersect: area))
> +                               fillStyle: (SkColorSet labelFor: model)
> +                               borderStyle: self borderStyle].
> +       self drawDependMap: aCanvas.
> +       self drawBorder: aCanvas.
> +       self drawContents: aCanvas!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>editContents (in category 'accessing')
> -----
> + editContents
> + self selection ifNil: [^''].
> +       ^ model
> +               ifNil: ['']
> +               ifNotNil: [model textAt: self selection origin]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>editContents: (in category 'accessing')
> -----
> + editContents: aText
> +       "Accept text"
> +       self selection ifNil: [^self].
> +       model
> +               ifNotNil: [model textAt: self selection origin put: aText].
> +       selectionMorph deleteEditor!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>fillStyle (in category 'visual
> properties') -----
> + fillStyle
> +       ^ SkColorSet baseFor: model rule!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>goto: (in category 'navigation') -----
> + goto: aSkObject
> +       | grid |
> +       self beep: 'rice'.
> +       grid _ aSkObject grid.
> +       self replace: grid.
> +       grid history: self.
> +       ^ grid!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>handlesKeyboard: (in category 'event
> handling') -----
> + handlesKeyboard: evt
> +       ^ true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>handlesMouseDown: (in category 'event
> handling') -----
> + handlesMouseDown: evt
> +       ^ true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>handlesMouseOver: (in category 'event
> handling') -----
> + handlesMouseOver: evt
> +       ^ true
> + !
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>handlesMouseOverDragging: (in category
> 'event handling') -----
> + handlesMouseOverDragging: evt
> +
> +       ^ true
> + !
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>height: (in category 'accessing') -----
> + height: aNumber
> +       ^ self setExtentFromHalo: self width @ aNumber!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>history: (in category 'navigation')
> -----
> + history: aSkSheetMorph
> +       history
> +               ifNil: [history _ aSkSheetMorph]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>initialize (in category
> 'initialization') -----
> + initialize
> +       super initialize.
> +       selectionMorph _ SkGridSelectionMorph new holder: self.
> +       self
> +               area: (1 @ 1 extent: 4 @ 4).
> +       self
> +               borderStyle: (RaisedBorder color: Color black width: 1).
> +       self
> +               fillStyle: (SolidFillStyle
> +                               color: (Color
> +                                               r: 1.0
> +                                               g: 0.935
> +                                               b: 0.839)).
> +       self cornerStyle: #rounded.
> +       self selection: nil.
> +       showFormula _ false!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>initializeToStandAlone (in category
> 'parts bin') -----
> + initializeToStandAlone
> +       super initializeToStandAlone.
> +       self model: SkSheet new attachProject.
> +       self
> +               area: (0 @ 0 extent: 3 @ 3)!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>isModelStepping (in category 'stepping
> and presenter') -----
> + isModelStepping
> +       ^ model isStepping!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>isMorphicModel (in category
> 'classification') -----
> + isMorphicModel
> +       ^true!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>keyStroke: (in category 'event
> handling') -----
> + keyStroke: evt
> +       selectionMorph keyStroke: evt!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>model (in category 'accessing') -----
> + model
> +       ^ model!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>model: (in category 'accessing') -----
> + model: anObject
> +       model
> +               ifNotNil: [model removeDependent: self].
> +       anObject
> +               ifNotNil: [anObject addDependent: self].
> +       model _ anObject.
> +       self update: #all.
> + !
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseDown: (in category 'event
> handling') -----
> + mouseDown: event
> +       self
> +               selectSelection: (self screenToCell: event position).
> +       event yellowButtonPressed
> +               ifTrue: [^ selectionMorph invokeMenu: event].
> +       "For easy doublecilck to selection"
> +       event hand waitForClicksOrDrag: selectionMorph event: event.
> +       event hand mouseFocus: selectionMorph!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseEnter: (in category 'event
> handling') -----
> + mouseEnter: evt
> +       | hand tile |
> +       hand _ evt hand.
> +       hand submorphs size = 1
> +               ifFalse: [^ self].
> +       tile _ hand firstSubmorph renderedMorph.
> +       (self wantsDroppedMorph: tile event: evt)
> +               ifFalse: [^ self].
> +       self
> +               startStepping: #trackDropZones
> +               at: Time millisecondClockValue
> +               arguments: nil
> +               stepTime: 20!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseEnterDragging: (in category 'event
> handling') -----
> + mouseEnterDragging: evt
> +       "Test button state elsewhere if at all"
> +       ^ self mouseEnter: evt!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseLeave: (in category 'event
> handling') -----
> + mouseLeave: evt
> +       dropZone _ nil.
> +       self stopSteppingSelector: #trackDropZones!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseLeaveDragging: (in category 'event
> handling') -----
> + mouseLeaveDragging: evt
> +       ^ self mouseLeave: evt!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>mouseUpTick:onItem: (in category 'event
> handling') -----
> + mouseUpTick: evt onItem: aMorph
> +       aMorph isTicking
> +               ifTrue: [model stopStepping.
> +                       aMorph isTicking: false]
> +               ifFalse: [model startStepping.
> +                       aMorph isTicking: true]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>openLibrary (in category 'action') -----
> + openLibrary
> +       (SkObject root at: 'Library') grid openInHand!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>paste (in category 'action') -----
> + paste
> +       | pos selection isJustACell |
> +       selection _ self selection.
> +       isJustACell _ selection extent = (1 @ 1).
> +       pos _ selection origin.
> +       Clipboard clipboardText
> +               split: Character cr
> +               do: [:line |
> +                       line
> +                               split: Character tab
> +                               do: [:field |
> +                                       (isJustACell
> +                                                       or: [selection
> containsPoint: pos])
> +                                               ifTrue: [model textAt: pos
> put: field].
> +                                       pos _ pos + (1 @ 0)].
> +                       pos _ selection left @ (pos y + 1)]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>previousPage (in category 'navigation')
> -----
> + previousPage
> +       self beep: 'rice'.
> +       ^ history
> +               ifNotNil: [self replace: history]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>privateRemoveMorph: (in category
> 'private') -----
> + privateRemoveMorph: aMorph
> +       aMorph class = SkCardMorph
> +               ifTrue: [self beep: 'cork'.
> +                       self model textAt: aMorph cellOrigin put: ''].
> +       super privateRemoveMorph: aMorph!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>replace: (in category 'navigation')
> -----
> + replace: aSkSheetMorph
> +       aSkSheetMorph area: self area.
> +       aSkSheetMorph position: self position.
> +       self owner replaceSubmorph: self by: aSkSheetMorph.
> +       ^ aSkSheetMorph!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>selectSelection: (in category 'action')
> -----
> + selectSelection: aPoint
> +       "Select at event position"
> +       aPoint
> +               ifNil: [^ self].
> +       self
> +               selection: (aPoint extent: 1 @ 1).
> +       self changed!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>selection (in category 'accessing')
> -----
> + selection
> +       ^ selectionMorph area!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>selection: (in category 'accessing')
> -----
> + selection: aRectangle
> +       (submorphs indexOf: selectionMorph) = 1
> +               ifFalse: [self addMorphFront: selectionMorph].
> +       selectionMorph area: aRectangle!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>selectionMorph (in category 'accessing')
> -----
> + selectionMorph
> +       ^ selectionMorph!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>setCellExtentFromHalo: (in category
> 'layout') -----
> + setCellExtentFromHalo: newExtent
> +       | eachExtent cellExtent |
> +       model
> +               ifNil: [^ self].
> +       cellExtent _ model
> +                               at: self cellExtentName
> +                               ifAbsent: [model
> +                                               at: self cellExtentName
> +                                               put: (SkSheet new parent:
> model)].
> +       eachExtent _ newExtent // self selection extent max: 10 @ 10.
> +       self selection left
> +               to: self selection right - 1
> +               do: [:x | cellExtent at: x @ 1 put: eachExtent].
> +       self selection top
> +               to: self selection bottom - 1
> +               do: [:y | cellExtent at: 1 @ y put: eachExtent].
> +       self areaChanged.
> +       self changed!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>setExtentFromHalo: (in category
> 'layout') -----
> + setExtentFromHalo: newExtent
> +       | card cardMorph direction size |
> +       super setExtentFromHalo: newExtent.
> +       direction := nil.
> +       area height = 1
> +               ifTrue:
> +                       [direction := #right.
> +                       size := area width - 1]
> +               ifFalse:
> +                       [area width = 1
> +                               ifTrue:
> +                                       [direction := #down.
> +                                       size := area height - 1]].
> +       direction ifNotNil:
> +                       [card := model new.
> +                       card direction: direction.
> +                       card size: size.
> +                       cardMorph := SkCardMorph model: card.
> +                       cardMorph position: self position.
> +                       self owner addMorph: cardMorph.
> +                       self halo ifNotNilDo: [:helo | helo setTarget:
> cardMorph].
> +                       self delete]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>showFormula (in category 'accessing')
> -----
> + showFormula
> +       ^ showFormula!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>spawn (in category 'action') -----
> + spawn
> +       model inspectAt: self selection topLeft!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>spawn: (in category 'action') -----
> + spawn: anObject
> +       self spawn!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>startStepping (in category 'stepping and
> presenter') -----
> + startStepping
> +       model
> +               ifNotNil: [model startStepping].
> +       super startStepping.
> + !
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>step (in category 'stepping and
> presenter') -----
> + step
> +       self changed!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>toggleFormula (in category 'accessing')
> -----
> + toggleFormula
> +       showFormula _ showFormula not!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>trackDropZones (in category 'event
> handling') -----
> + trackDropZones
> +       | hand target |
> +       hand _ self primaryHand.
> +       ((self hasOwner: hand) not
> +                       and: [hand submorphCount > 0])
> +               ifTrue: [target _ hand submorphs first.
> +                       dropZone _ (self screenToCell: target topLeft)
> +                                               extent: ((target
> respondsTo: #area)
> +                                                               ifTrue:
> [target area extent]
> +                                                               ifFalse: [1
> @ 1]).
> +                       (dropZone topLeft x < 1
> +                                       or: [dropZone topLeft y < 1])
> +                               ifTrue: [dropZone _ nil].
> +                       self changed]
> +               ifFalse: [dropZone _ nil.
> +                       self stopSteppingSelector: #trackDropZones]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>tryToRenameTo: (in category 'accessing')
> -----
> + tryToRenameTo: aName
> +       ^ model
> +               ifNotNilDo: [:m | m name: aName]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>upPage (in category 'navigation') -----
> + upPage
> +       self beep: 'rice'.
> +       ^ self goto: model up!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>update: (in category 'updating') -----
> + update: anObject
> +       anObject = #cardList
> +               ifTrue: [self updateCardList].
> +       anObject = #all
> +               ifTrue: [self updateCardList].
> +       self changed!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>updateCardList (in category 'updating')
> -----
> + updateCardList
> +       | cardList morph |
> +       cardList _ model cardList: self visibleArea.
> +       self
> +               removeAllMorphsIn: (self submorphs
> +                               select: [:m | m class == SkCardMorph]).
> +       cardList
> +               do: [:cardInfo |
> +                       morph _ SkCardMorph model: cardInfo value.
> +                       morph holder: self.
> +                       self addMorph: morph.
> +                       morph cellOrigin: cardInfo key].
> +       selectionMorph hide!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>veryDeepInner: (in category 'copying')
> -----
> + veryDeepInner: deepCopier
> +       "history is not copied"
> +       model _ model veryDeepCopyWith: deepCopier.
> +       selectionMorph _ (selectionMorph veryDeepCopyWith: deepCopier)
> holder: self.
> +       dropZone _ dropZone veryDeepCopyWith: deepCopier.
> +       showFormula _ showFormula veryDeepCopyWith: deepCopier.
> +       super veryDeepInner: deepCopier!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>wantsDroppedMorph:event: (in category
> 'drag and drop') -----
> + wantsDroppedMorph: aMorph event: anEvent
> +       ^ aMorph class = PhraseTileMorph
> +               or: [aMorph class = TileMorph
> +                               or: [aMorph isKindOf: SkGridPartsMorph]]!
>
> Item was added:
> + ----- Method: SkBasicSheetMorph>>width: (in category 'accessing') -----
> + width: aNumber
> +       ^ self setExtentFromHalo: aNumber @ self height!
>
> Item was changed:
>  ----- Method: SkCardMorph>>doubleClick: (in category 'event handling')
> -----
>  doubleClick: evt
>        | sheet |
>        (holder notNil
>                        and: [owner = holder])
>                ifTrue: [^ holder goto: model].
>        self owner = World
>                ifTrue: [self delete].
> +       sheet _ SkBasicSheetMorph allInstances
> -       sheet _ SkSheetMorph allInstances
>                                detect: [:each | each world = World
>                                                and: [each model = model]]
>                                ifNone: [model grid].
>        sheet position: self position;
>                 openInWorld!
>
> Item was changed:
>  ----- Method: SkCardMorph>>replaceToSheet: (in category 'layout') -----
>  replaceToSheet: newCellExtent
>        "Create new spreadsheet for the model. And I will be deleted"
>        | sheetMorph |
>        (newCellExtent y > 1
>                        and: [newCellExtent x > 1])
> +               ifTrue: [sheetMorph _ SkBasicSheetMorph new model: model.
> -               ifTrue: [sheetMorph _ SkSheetMorph new model: model.
>                        sheetMorph
>                                area: (0 @ 0 extent: newCellExtent).
>                        sheetMorph position: self position.
>                        self owner addMorph: sheetMorph.
>                        self halo
>                                ifNotNilDo: [:helo | helo setTarget:
> sheetMorph].
>                        ^ self delete]!
>
> Item was changed:
>  ----- Method: SkObject class>>grid (in category 'instance creation') -----
>  grid
>        | case grid |
> +       grid _ SkBasicSheetMorph new model: (case _ self new).
> -       grid _ SkSheetMorph new model: (case _ self new).
>        grid area: case defaultArea.
>        ^ grid!
>
> Item was changed:
>  ----- Method: SkObject>>grid (in category 'initialization') -----
>  grid
>        | grid |
> +       grid _ SkBasicSheetMorph new model: self.
> -       grid _ SkSheetMorph new model: self.
>        grid area: self defaultArea.
>        ^ grid!
>
> Item was changed:
> + Morph subclass: #SkSheetMorph
> +       instanceVariableNames: 'sheet'
> - SkGridMorph subclass: #SkSheetMorph
> -       instanceVariableNames: 'history model selectionMorph dropZone
> showFormula'
>        classVariableNames: ''
>        poolDictionaries: ''
>        category: 'Skeleton-Base'!
> -
> - !SkSheetMorph commentStamp: 'tak 12/11/2003 19:10' prior: 0!
> - I am a presentation compornent for showing as 2-D grid.
> - The contents what I show is depended on a model.
> - I never access to a cell directly except through model because
> - a cell doesn't know where he locates. Basically, Position information is
> - only in model.
> -
> - cellArea              Rectangle -- the area of cells for drawing. Actual
> size of table is cellArea extent.
> - model         SkSheet --
> - !
>
> Item was changed:
> + ----- Method: SkSheetMorph class>>additionsToViewerCategories (in
> category 'as yet unclassified') -----
> - ----- Method: SkSheetMorph class>>additionsToViewerCategories (in
> category 'viewer categories') -----
>  additionsToViewerCategories
> +       ^(Smalltalk at: #SkRawSheetMorph ifAbsent: [^ #()])
> +               additionsToViewerCategories!
> - ^ #(
> - (#spreadsheet (
> - #(command clearTable 'Deletes the contents of all cells')
> - #(command clearRow 'Deletes the contents of the current row cells' )
> - #(command clearColumn 'Deletes the contents of the current columns cells'
> )
> - #(slot totalRows 'Lets you change the amount of rows in the spreadsheet'
> Number readWrite Player getTotalRows Player setTotalRows:  )
> - #(slot totalColumns 'Lets you change the amount of columns in the
> spreadsheet' Number readWrite Player getTotalColumns Player setTotalColumns:
>  )
> - #(slot rowIndex 'Sets the current row' Number readWrite Player
> getRowIndex Player setRowIndex:  )
> - #(slot columnIndex 'Sets the current column' Number readWrite Player
> getColumnIndex Player setColumnIndex:  )
> - #(slot currentCharacters 'Lets you read and modify the characters of the
> current cell' String readWrite Player getCurrentCharacters Player
> setCurrentCharacters:  )
> - #(slot currentNumericValue 'Lets you read and modify the numeric value of
> the current cell' Number readWrite Player getCurrentNumericValue Player
> setCurrentNumericValue:  )
> - ))
> -
> - (#'data i/o' (
> - #(slot writeMode 'Lets you choose a write mode (overwrite or append)'
> WriteMode readWrite Player getWriteMode Player setWriteMode:  )
> - #(slot csvSeparator 'Lets you choose a character to act as a separator
> between cells' String readWrite Player getCsvSeparator Player
> setCsvSeparator:  )
> - #(slot csvFileName 'Sets the name of the file to import/export data'
> String readWrite Player getCsvFileName Player setCsvFileName:  )
> - #(command importDataFromFile 'Reads the data from the file and loads it
> in the spreadsheet')
> - #(command exportDataToFile 'Writes the data from the spreadsheet into the
> file')
> - ))
> -
> - )!
>
> Item was changed:
> + ----- Method: SkSheetMorph class>>descriptionForPartsBin (in category 'as
> yet unclassified') -----
> - ----- Method: SkSheetMorph class>>descriptionForPartsBin (in category
> 'parts bin') -----
>  descriptionForPartsBin
> +       ^ self partName:        'Spreadsheet' translated
> +               categories:             {'Skeleton' translated}
> +               documentation:  'A spreadsheet' translated!
> -       ^ self partName:        'Spread Sheet'
> -               categories:             #('Skeleton')
> -               documentation:  'A spread sheet'!
>
> Item was removed:
> - ----- Method: SkSheetMorph class>>formPreviousPage (in category
> 'constants') -----
> - formPreviousPage
> -  ^((ColorForm
> -       extent: 5 at 9
> -       depth: 1
> -       fromArray: #( 4026531840 3758096384 3489660928 2952790016
> 1879048192 2952790016 3489660928 3758096384 4026531840)
> -       offset: 0 at 0)
> -       colorsFromArray: #(#(0.0 0.0 0.0) #( )  ))
> - " form storeString "!
>
> Item was removed:
> - ----- Method: SkSheetMorph class>>formUpPage (in category 'constants')
> -----
> - formUpPage
> -  ^((ColorForm
> -       extent: 9 at 5
> -       depth: 2
> -       fromArray: #( 2859106304 2845474816 2795929600 2326298624
> 1431650304)
> -       offset: 0 at 0)
> -       colorsFromArray: #(#(0.004 0.004 0.008) #(0.0 0.0 0.004) #( ) #(0.0
> 0.0 0.0)  ))
> - " form storeString "!
>
> Item was removed:
> - ----- Method: SkSheetMorph class>>initialize (in category 'class
> initialization') -----
> - initialize
> -       "
> -       self initialize.
> -       "
> -       Vocabulary addStandardVocabulary: (SymbolListType new
> vocabularyName: #WriteMode;
> -                        symbols: #(#overwrite #append)).!
>
> Item was removed:
> - ----- Method: SkSheetMorph class>>model: (in category 'instance
> creation') -----
> - model: aSkObject
> -       ^ super new model: aSkObject!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>acceptDroppingMorph:event: (in category 'drag
> and drop') -----
> - acceptDroppingMorph: aMorph event: evt
> -       | cellPos successed |
> -       cellPos _ self screenToCell: aMorph topLeft.
> -       (cellPos x < 1
> -                       or: [cellPos y < 1])
> -               ifTrue: [self beep: 'arrow'.
> -                       ^ aMorph rejectDropMorphEvent: evt].
> -       successed _ false.
> -       successed _ (aMorph isKindOf: SkGridPartsMorph)
> -                               ifTrue: [self acceptRuleMorph: aMorph
> event: evt]
> -                               ifFalse: [aMorph class = PhraseTileMorph
> -                                               ifTrue: [self
> acceptPhraseTileMorph: aMorph event: evt]
> -                                               ifFalse: [aMorph class =
> TileMorph
> -                                                               ifTrue:
> [self acceptTileMorph: aMorph event: evt]]].
> -       successed
> -               ifTrue: [self beep: 'cassete']
> -               ifFalse: [self beep: 'arrow'.
> -                       aMorph rejectDropMorphEvent: evt]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>acceptPhraseTileMorph:event: (in category
> 'drag and drop') -----
> - acceptPhraseTileMorph: aMorph event: evt
> -       | setter getter |
> -       getter _ aMorph operatorTile operatorOrExpression.
> -       setter _ ('set'
> -                               , (getter allButFirst: 3) , ':') asSymbol.
> -       self model
> -               modelAt: (self screenToCell: aMorph topLeft)
> -               for: aMorph actualObject
> -               getter: getter
> -               setter: setter.
> -       ^ true!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>acceptRuleMorph:event: (in category 'drag and
> drop') -----
> - acceptRuleMorph: aMorph event: evt
> -       | cellPos card |
> -       model parent adopt: aMorph model rule.
> -       cellPos _ (self screenToCell: aMorph topLeft)
> -                               + (aMorph cellOrigin - aMorph area
> topLeft).
> -       self model textAt: cellPos put: '=' , aMorph model codeString.
> -       card _ self
> -                               cardMorphAt: cellPos
> -                               ifAbsent: [^ false].
> -       card model rule = aMorph model rule
> -               ifFalse: ["maybe successed"
> -                       ^ false].
> -       aMorph halo
> -               ifNotNilDo: [:halo | halo setTarget: card].
> -       ^ true!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>acceptTileMorph:event: (in category 'drag and
> drop') -----
> - acceptTileMorph: aMorph event: evt
> -       | object |
> -       object _ aMorph actualObject.
> -       self model
> -               at: (self screenToCell: aMorph topLeft)
> -               put: object.
> -       ^ true!
>
> Item was added:
> + ----- Method: SkSheetMorph>>addPageControls (in category
> 'initialization') -----
> + addPageControls
> +       | panel prev up title |
> +
> +       panel := AlignmentMorph newRow
> +                               color: Color transparent;
> +                               cellInset: 3;
> +                               hResizing: #shrinkWrap;
> +                               vResizing: #shrinkWrap.
> +       panel addMorphBack: self tickMorph.
> +       prev := SketchMorph withForm: self prevButtonForm.
> +       prev
> +               on: #mouseDown
> +               send: #previousPage
> +               to: sheet.
> +       prev position: 32 @ 3.
> +       prev setBalloonText: 'View the previous sheet.' translated.
> +       panel addMorphBack: prev.
> +       up := SketchMorph withForm: self upButtonForm.
> +       up
> +               on: #mouseDown
> +               send: #upPage
> +               to: sheet.
> +       up position: 44 @ 4.
> +       up setBalloonText: 'View the definision or the parent rule.'
> translated.
> +       panel addMorphBack: up.
> +       title := UpdatingStringMorph new useStringFormat
> +               target: self;
> +               putSelector: #setNameTo:;
> +               getSelector: #externalName.
> +       panel addMorphBack: title.
> +       self addMorph: panel!
>
> Item was added:
> + ----- Method: SkSheetMorph>>addSheet: (in category 'initialization')
> -----
> + addSheet: aSheet
> +       self addMorph: (sheet := aSheet).
> +       self renameTo: sheet externalName!
>
> Item was added:
> + ----- Method: SkSheetMorph>>area: (in category 'sheet delegation') -----
> + area: aRectangle
> +       ^ sheet area: aRectangle
> +       !
>
> Item was removed:
> - ----- Method: SkSheetMorph>>areaChanged (in category 'layout') -----
> - areaChanged
> -       super areaChanged.
> -       self
> -               submorphsDo: [:m | (m isKindOf: SkGridMorph)
> -                               ifTrue: [m areaChanged]]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>cardMorphAt:ifAbsent: (in category
> 'accessing') -----
> - cardMorphAt: aPoint ifAbsent: aBlock
> -       ^ self submorphs
> -               detect: [:m | m class = SkCardMorph
> -                               and: [m cellOrigin = aPoint]]
> -               ifNone: aBlock!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>cellExtentAt: (in category 'layout') -----
> - cellExtentAt: aPoint
> -       | cellExtent x y |
> -       ^ (model notNil
> -                       and: [(cellExtent _ model findName: self
> cellExtentName) class == SkSheet ])
> -               ifTrue: [x _ (cellExtent
> -                                               at: aPoint x @ 1
> -                                               ifAbsent: [SkGridMorph
> standardCellExtent]) x.
> -                       y _ (cellExtent
> -                                               at: 1 @ aPoint y
> -                                               ifAbsent: [SkGridMorph
> standardCellExtent]) y.
> -                       x @ y]
> -               ifFalse: [SkGridMorph standardCellExtent]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>cellExtentName (in category 'layout') -----
> - cellExtentName
> -       ^ 'CellExtent'!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>copySelection (in category 'action') -----
> - copySelection
> -       | text |
> -       text _ Text
> -                               streamContents: [:aStream | self selection
> top
> -                                               to: self selection bottom -
> 1
> -                                               do: [:y |
> -                                                       (self selection
> left to: self selection right - 1)
> -                                                               do: [:x |
> aStream
> -
>     nextPutAll: (model textAt: x @ y)]
> -
> separatedBy: [aStream nextPut: Character tab].
> -                                                       aStream nextPut:
> Character cr]].
> -       Clipboard clipboardText: text!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>cut (in category 'action') -----
> - cut
> -       self copySelection.
> -       self selection top
> -               to: self selection bottom - 1
> -               do: [:y | self selection left
> -                               to: self selection right - 1
> -                               do: [:x | model textAt: x @ y put: '']]!
>
> Item was added:
> + ----- Method: SkSheetMorph>>doesNotUnderstand: (in category 'dnu') -----
> + doesNotUnderstand: aMessage
> +       "Quick hack to automagically generate missing methods"
> +       self flag: #Richo.
> +       (sheet respondsTo: aMessage selector)
> +               ifTrue: [ | str |
> +                       str := aMessage createStubMethod allButLast: 24.
> +                       self class compile: str, '^ sheet ', str
> classified: #'autogenerated'.
> +                       ^aMessage sentTo: self.
> +                       ]
> +               ifFalse: [^super doesNotUnderstand: aMessage]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>drawCell:at: (in category 'drawing') -----
> - drawCell: aCanvas at: aPoint
> -       (aPoint x isZero
> -                       or: [aPoint y isZero])
> -               ifTrue: [^ self
> -                               drawLabel: aCanvas
> -                               string: (self labelAt: aPoint)
> -                               at: aPoint].
> -       self flag: #TODO.
> -       self
> -               drawContents: ((showFormula notNil
> -                                       and: [showFormula])
> -                               ifTrue: [model textAt: aPoint]
> -                               ifFalse: [ showFormula _ false.model at:
> aPoint.])
> -               on: aCanvas
> -               at: aPoint!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>drawName: (in category 'drawing') -----
> - drawName: aCanvas
> -       | name |
> -       name := model ruleName asString.
> -       model isInstance
> -               ifTrue: [name := name , '*'].
> -       aCanvas
> -               clipBy: self bounds
> -               during: [:canvas | canvas
> -                               drawString: name
> -                               at: self topLeft + (28 @ 6)
> -                               font: self class titleStyle
> -                               color: Color gray]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>drawOn: (in category 'drawing') -----
> - drawOn: aCanvas
> -       super drawOn: aCanvas.
> -       self drawGrabAreaOn: aCanvas.
> -       dropZone
> -               ifNotNil: [aCanvas
> -                               fillRectangle: (self
> -                                               cellAreaToScreen: (dropZone
> intersect: area))
> -                               fillStyle: (SkColorSet labelFor: model)
> -                               borderStyle: self borderStyle].
> -       self drawDependMap: aCanvas.
> -       self drawName: aCanvas.
> -       self drawBorder: aCanvas.
> -       self drawContents: aCanvas!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>editContents (in category 'accessing') -----
> - editContents
> - self selection ifNil: [^''].
> -       ^ model
> -               ifNil: ['']
> -               ifNotNil: [model textAt: self selection origin]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>editContents: (in category 'accessing') -----
> - editContents: aText
> -       "Accept text"
> -       self selection ifNil: [^self].
> -       model
> -               ifNotNil: [model textAt: self selection origin put: aText].
> -       selectionMorph deleteEditor!
>
> Item was added:
> + ----- Method: SkSheetMorph>>extent: (in category 'accessing') -----
> + extent: newExtent
> +
> +       sheet setExtentFromHalo: (newExtent max: (165 at 77)) -
> +                                                               (self
> layoutInset + self cellInset + (0 @ self pageControls height))!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>fillStyle (in category 'visual properties')
> -----
> - fillStyle
> -       ^ SkColorSet baseFor: model rule!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>goto: (in category 'navigation') -----
> - goto: aSkObject
> -       | grid |
> -       self beep: 'rice'.
> -       grid _ aSkObject grid.
> -       self replace: grid.
> -       grid history: self.
> -       ^ grid!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>handlesKeyboard: (in category 'event
> handling') -----
> - handlesKeyboard: evt
> -       ^ true!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>handlesMouseDown: (in category 'event
> handling') -----
> - handlesMouseDown: evt
> -       ^ (self grabArea containsPoint: evt position) not!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>handlesMouseOver: (in category 'event
> handling') -----
> - handlesMouseOver: evt
> -       ^ true
> - !
>
> Item was removed:
> - ----- Method: SkSheetMorph>>handlesMouseOverDragging: (in category 'event
> handling') -----
> - handlesMouseOverDragging: evt
> -
> -       ^ true
> - !
>
> Item was removed:
> - ----- Method: SkSheetMorph>>height: (in category 'accessing') -----
> - height: aNumber
> -       ^ self setExtentFromHalo: self width @ aNumber!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>history: (in category 'navigation') -----
> - history: aSkSheetMorph
> -       history
> -               ifNil: [history _ aSkSheetMorph]!
>
> Item was changed:
>  ----- Method: SkSheetMorph>>initialize (in category 'initialization')
> -----
>  initialize
>        super initialize.
> +       self layoutPolicy:      TableLayout new;
> +               cellPositioning: #leftCenter;
> +               cornerStyle: #rounded;
> +               color: (Color r: 0.645 g: 0.645 b: 1.0);
> +               borderWidth: 1;
> +               borderColor: (Color r: 0.516 g: 0.516 b: 1.0);
> +               listDirection: #topToBottom;
> +               hResizing: #shrinkWrap;
> +               vResizing: #shrinkWrap.
> +       self addSheet: SkBasicSheetMorph newStandAlone;
> +               addPageControls!
> -       self showPageControls.
> -       selectionMorph _ SkGridSelectionMorph new holder: self.
> -       self
> -               area: (1 @ 1 extent: 4 @ 4).
> -       self
> -               borderStyle: (RaisedBorder color: Color black width: 1).
> -       self
> -               fillStyle: (SolidFillStyle
> -                               color: (Color
> -                                               r: 1.0
> -                                               g: 0.935
> -                                               b: 0.839)).
> -       self cornerStyle: #rounded.
> -       self selection: nil.
> -       showFormula _ false!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>initializeToStandAlone (in category 'parts
> bin') -----
> - initializeToStandAlone
> -       super initializeToStandAlone.
> -       self model: SkSheet new attachProject.
> -       self
> -               area: (0 @ 0 extent: 3 @ 3)!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>isModelStepping (in category 'stepping and
> presenter') -----
> - isModelStepping
> -       ^ model isStepping!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>isMorphicModel (in category 'classification')
> -----
> - isMorphicModel
> -       ^true!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>keyStroke: (in category 'event handling')
> -----
> - keyStroke: evt
> -       selectionMorph keyStroke: evt!
>
> Item was changed:
> + ----- Method: SkSheetMorph>>model (in category 'sheet delegation') -----
> - ----- Method: SkSheetMorph>>model (in category 'accessing') -----
>  model
> +       ^ sheet model!
> -       ^ model!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>model: (in category 'accessing') -----
> - model: anObject
> -       model
> -               ifNotNil: [model removeDependent: self].
> -       anObject
> -               ifNotNil: [anObject addDependent: self].
> -       model _ anObject.
> -       self update: #all.
> - !
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseDown: (in category 'event handling')
> -----
> - mouseDown: event
> -       self
> -               selectSelection: (self screenToCell: event position).
> -       event yellowButtonPressed
> -               ifTrue: [^ selectionMorph invokeMenu: event].
> -       "For easy doublecilck to selection"
> -       event hand waitForClicksOrDrag: selectionMorph event: event.
> -       event hand mouseFocus: selectionMorph!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseEnter: (in category 'event handling')
> -----
> - mouseEnter: evt
> -       | hand tile |
> -       hand _ evt hand.
> -       hand submorphs size = 1
> -               ifFalse: [^ self].
> -       tile _ hand firstSubmorph renderedMorph.
> -       (self wantsDroppedMorph: tile event: evt)
> -               ifFalse: [^ self].
> -       self
> -               startStepping: #trackDropZones
> -               at: Time millisecondClockValue
> -               arguments: nil
> -               stepTime: 20!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseEnterDragging: (in category 'event
> handling') -----
> - mouseEnterDragging: evt
> -       "Test button state elsewhere if at all"
> -       ^ self mouseEnter: evt!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseLeave: (in category 'event handling')
> -----
> - mouseLeave: evt
> -       dropZone _ nil.
> -       self stopSteppingSelector: #trackDropZones!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseLeaveDragging: (in category 'event
> handling') -----
> - mouseLeaveDragging: evt
> -       ^ self mouseLeave: evt!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>mouseUpTick:onItem: (in category 'event
> handling') -----
> - mouseUpTick: evt onItem: aMorph
> -       aMorph isTicking
> -               ifTrue: [model stopStepping.
> -                       aMorph isTicking: false]
> -               ifFalse: [model startStepping.
> -                       aMorph isTicking: true]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>openLibrary (in category 'action') -----
> - openLibrary
> -       (SkObject root at: 'Library') grid openInHand!
>
> Item was added:
> + ----- Method: SkSheetMorph>>pageControls (in category 'accessing') -----
> + pageControls
> +       ^ self submorphs detect: [:each | each ~~ sheet]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>paste (in category 'action') -----
> - paste
> -       | pos selection isJustACell |
> -       selection _ self selection.
> -       isJustACell _ selection extent = (1 @ 1).
> -       pos _ selection origin.
> -       Clipboard clipboardText
> -               split: Character cr
> -               do: [:line |
> -                       line
> -                               split: Character tab
> -                               do: [:field |
> -                                       (isJustACell
> -                                                       or: [selection
> containsPoint: pos])
> -                                               ifTrue: [model textAt: pos
> put: field].
> -                                       pos _ pos + (1 @ 0)].
> -                       pos _ selection left @ (pos y + 1)]!
>
> Item was added:
> + ----- Method: SkSheetMorph>>prevButtonForm (in category 'accessing')
> -----
> + prevButtonForm
> +       ^(Form
> +       extent: 9 at 16
> +       depth: 16
> +       fromArray: #( 0 0 0 0 0 0 0 0 0 831258624 0 0 0 12684 831258624 0 0
> 0 831279775 831258624 0 0 12684 1386173087 831258624 0 0 831279775
> 1386173087 831258624 0 12684 1386173087 1386173087 831258624 0 831279775
> 1386173087 1386173087 831258624 12684 1386173087 1386173087 1386173087
> 831258624 0 831279775 1386173087 1386173087 831258624 0 12684 1386173087
> 1386173087 831258624 0 0 831279775 1386173087 831258624 0 0 12684 1386173087
> 831258624 0 0 0 831279775 831258624 0 0 0 12684 831258624 0 0 0 0 831258624)
> +       offset: 522 at 183)!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>previousPage (in category 'navigation') -----
> - previousPage
> -       self beep: 'rice'.
> -       ^ history
> -               ifNotNil: [self replace: history]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>privateRemoveMorph: (in category 'private')
> -----
> - privateRemoveMorph: aMorph
> -       aMorph class = SkCardMorph
> -               ifTrue: [self beep: 'cork'.
> -                       self model textAt: aMorph cellOrigin put: ''].
> -       super privateRemoveMorph: aMorph!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>replace: (in category 'navigation') -----
> - replace: aSkSheetMorph
> -       aSkSheetMorph area: self area.
> -       aSkSheetMorph position: self position.
> -       self delete.
> -       aSkSheetMorph openInWorld.
> -       ^ aSkSheetMorph!
>
> Item was added:
> + ----- Method: SkSheetMorph>>replaceSubmorph:by: (in category
> 'submorphs-add/remove') -----
> + replaceSubmorph: oldMorph by: newMorph
> +       "Update page controls if the sheet gets replaced."
> +       ^ oldMorph == sheet
> +               ifTrue: [self submorphsDo: [:each | each delete];
> +                                       addSheet: newMorph;
> +                                       addPageControls]
> +               ifFalse: [super replaceSubmorph: oldMorph by: newMorph]!
>
> Item was changed:
> + ----- Method: SkSheetMorph>>selectSelection: (in category 'sheet
> delegation') -----
> - ----- Method: SkSheetMorph>>selectSelection: (in category 'action') -----
>  selectSelection: aPoint
> +       ^ sheet selectSelection: aPoint
> +       !
> -       "Select at event position"
> -       aPoint
> -               ifNil: [^ self].
> -       self
> -               selection: (aPoint extent: 1 @ 1).
> -       self changed!
>
> Item was changed:
> + ----- Method: SkSheetMorph>>selection (in category 'sheet delegation')
> -----
> - ----- Method: SkSheetMorph>>selection (in category 'accessing') -----
>  selection
> +       ^ sheet selection
> +       !
> -       ^ selectionMorph area!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>selection: (in category 'accessing') -----
> - selection: aRectangle
> -       submorphs first == selectionMorph
> -               ifFalse: [self addMorphFront: selectionMorph].
> -       selectionMorph area: aRectangle!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>selectionMorph (in category 'accessing')
> -----
> - selectionMorph
> -       ^ selectionMorph!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>setCellExtentFromHalo: (in category 'layout')
> -----
> - setCellExtentFromHalo: newExtent
> -       | eachExtent cellExtent |
> -       model
> -               ifNil: [^ self].
> -       cellExtent _ model
> -                               at: self cellExtentName
> -                               ifAbsent: [model
> -                                               at: self cellExtentName
> -                                               put: (SkSheet new parent:
> model)].
> -       eachExtent _ newExtent // self selection extent max: 10 @ 10.
> -       self selection left
> -               to: self selection right - 1
> -               do: [:x | cellExtent at: x @ 1 put: eachExtent].
> -       self selection top
> -               to: self selection bottom - 1
> -               do: [:y | cellExtent at: 1 @ y put: eachExtent].
> -       self areaChanged.
> -       self changed!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>setExtentFromHalo: (in category 'layout')
> -----
> - setExtentFromHalo: newExtent
> -       | card cardMorph direction size |
> -       super setExtentFromHalo: newExtent.
> -       direction := nil.
> -       area height = 1
> -               ifTrue:
> -                       [direction := #right.
> -                       size := area width - 1]
> -               ifFalse:
> -                       [area width = 1
> -                               ifTrue:
> -                                       [direction := #down.
> -                                       size := area height - 1]].
> -       direction ifNotNil:
> -                       [card := model new.
> -                       card direction: direction.
> -                       card size: size.
> -                       cardMorph := SkCardMorph model: card.
> -                       cardMorph position: self position.
> -                       self owner addMorph: cardMorph.
> -                       self halo ifNotNilDo: [:helo | helo setTarget:
> cardMorph].
> -                       self delete]!
>
> Item was added:
> + ----- Method: SkSheetMorph>>setNameTo: (in category 'renaming') -----
> + setNameTo: aName
> +       sheet tryToRenameTo: aName.
> +       super setNameTo: aName!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>showFormula (in category 'accessing') -----
> - showFormula
> -       ^ showFormula!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>showPageControls (in category
> 'initialization') -----
> - showPageControls
> -       | panel prev up |
> -       panel _ Morph new extent: 80 at 20; color: Color transparent.
> -       panel
> -               on: #mouseDown
> -               send: #yourself
> -               to: self.
> -       panel addMorph: self tickMorph.
> -       prev _ (PolygonMorph new setVertices: {0 @ 7. 7 @ 0. 7 @ 14})
> borderWidth: 1;
> - borderColor: Color darkGray;
> -                                color: Color transparent.
> -       prev
> -               on: #mouseDown
> -               send: #previousPage
> -               to: self.
> -       prev position: 24 @ 3.
> -       prev setBalloonText: 'View the previous sheet.' translated.
> -       panel addMorph: prev.
> -       up _ prev copy heading: 90.
> -       up
> -               on: #mouseDown
> -               send: #upPage
> -               to: self.
> -       up position: 36 @ 4.
> -       up setBalloonText: 'View the definision or the parent rule.'
> translated.
> -
> -       panel addMorph: up.
> -       self addMorph: panel!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>spawn (in category 'action') -----
> - spawn
> -       model inspectAt: self selection topLeft!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>spawn: (in category 'action') -----
> - spawn: anObject
> -       self spawn!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>startStepping (in category 'stepping and
> presenter') -----
> - startStepping
> -       model
> -               ifNotNil: [model startStepping].
> -       super startStepping.
> - !
>
> Item was changed:
> + ----- Method: SkSheetMorph>>step (in category 'stepping') -----
> - ----- Method: SkSheetMorph>>step (in category 'stepping and presenter')
> -----
>  step
> +       sheet step!
> -       self changed!
>
> Item was changed:
> + ----- Method: SkSheetMorph>>tickMorph (in category 'accessing') -----
> - ----- Method: SkSheetMorph>>tickMorph (in category 'initialization')
> -----
>  tickMorph
>        | tick |
>        tick _ SkPluggableTickMorph new.
> +       tick on: sheet isTickingSel: #isModelStepping.
> -       tick position: self position + 1.
> -       tick on: self isTickingSel: #isModelStepping.
>        tick
>                on: #mouseUp
>                send: #mouseUpTick:onItem:
> +               to: sheet.
> -               to: self.
>        tick stepTime: 500.
>        tick startStepping.
>        tick setBalloonText: 'Press to toggle ticking state.' translated.
>        ^ tick!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>toggleFormula (in category 'accessing') -----
> - toggleFormula
> -       showFormula _ showFormula not!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>trackDropZones (in category 'event handling')
> -----
> - trackDropZones
> -       | hand target |
> -       hand _ self primaryHand.
> -       ((self hasOwner: hand) not
> -                       and: [hand submorphCount > 0])
> -               ifTrue: [target _ hand submorphs first.
> -                       dropZone _ (self screenToCell: target topLeft)
> -                                               extent: ((target
> respondsTo: #area)
> -                                                               ifTrue:
> [target area extent]
> -                                                               ifFalse: [1
> @ 1]).
> -                       (dropZone topLeft x < 1
> -                                       or: [dropZone topLeft y < 1])
> -                               ifTrue: [dropZone _ nil].
> -                       self changed]
> -               ifFalse: [dropZone _ nil.
> -                       self stopSteppingSelector: #trackDropZones]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>tryToRenameTo: (in category 'accessing')
> -----
> - tryToRenameTo: aName
> -       ^ model
> -               ifNotNilDo: [:m | m name: aName]!
>
> Item was added:
> + ----- Method: SkSheetMorph>>upButtonForm (in category 'accessing') -----
> + upButtonForm
> +       ^ self prevButtonForm copy rotateBy: 90!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>upPage (in category 'navigation') -----
> - upPage
> -       self beep: 'rice'.
> -       ^ self goto: model up!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>update: (in category 'updating') -----
> - update: anObject
> -       anObject = #cardList
> -               ifTrue: [self updateCardList].
> -       anObject = #all
> -               ifTrue: [self updateCardList].
> -       self changed!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>updateCardList (in category 'updating') -----
> - updateCardList
> -       | cardList morph |
> -       cardList _ model cardList: self visibleArea.
> -       self
> -               removeAllMorphsIn: (self submorphs
> -                               select: [:m | m class == SkCardMorph]).
> -       cardList
> -               do: [:cardInfo |
> -                       morph _ SkCardMorph model: cardInfo value.
> -                       morph holder: self.
> -                       self addMorph: morph.
> -                       morph cellOrigin: cardInfo key].
> -       selectionMorph hide!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>veryDeepInner: (in category 'copying') -----
> - veryDeepInner: deepCopier
> -       "history is not copied"
> -       model _ model veryDeepCopyWith: deepCopier.
> -       selectionMorph _ (selectionMorph veryDeepCopyWith: deepCopier)
> holder: self.
> -       dropZone _ dropZone veryDeepCopyWith: deepCopier.
> -       showFormula _ showFormula veryDeepCopyWith: deepCopier.
> -       super veryDeepInner: deepCopier!
>
> Item was added:
> + ----- Method: SkSheetMorph>>visibleArea (in category 'sheet delegation')
> -----
> + visibleArea
> +       ^ sheet visibleArea
> +       !
>
> Item was removed:
> - ----- Method: SkSheetMorph>>wantsDroppedMorph:event: (in category 'drag
> and drop') -----
> - wantsDroppedMorph: aMorph event: anEvent
> -       ^ aMorph class = PhraseTileMorph
> -               or: [aMorph class = TileMorph
> -                               or: [aMorph isKindOf: SkGridPartsMorph]]!
>
> Item was removed:
> - ----- Method: SkSheetMorph>>width: (in category 'accessing') -----
> - width: aNumber
> -       ^ self setExtentFromHalo: aNumber @ self height!
>
> Item was changed:
>  ----- Method: SkValueCell>>slotName (in category 'accessing') -----
>  slotName
>        "See Player>>tearOffFancyWatcherFor:"
>        | info watcherWording anInterface |
>        info _ model slotInfoForGetter: getter.
>        info
>                ifNil: [anInterface _ Vocabulary eToyVocabulary
>                                                methodInterfaceAt: getter
>                                                ifAbsent: [].
> +                       watcherWording _ anInterface wording]
> -                       watcherWording _ anInterface elementWording]
>                ifNotNil: [watcherWording _ Utilities
> inherentSelectorForGetter: getter].
>        ^ model tileReferringToSelf bePossessive labelMorph contents , ' ' ,
> watcherWording!
>
>
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20111018/26c3e0fd/attachment-0001.html>


More information about the etoys-dev mailing list