The Trunk: Nebraska-mt.55.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Nebraska-mt.55.mcz

commits-2
Marcel Taeumel uploaded a new version of Nebraska to project The Trunk:
http://source.squeak.org/trunk/Nebraska-mt.55.mcz

==================== Summary ====================

Name: Nebraska-mt.55
Author: mt
Time: 2 September 2019, 9:26:42.299272 am
UUID: d5506310-80f2-3349-aaed-f0e6cee4e679
Ancestors: Nebraska-ul.54

Cleans up duplication in extension categories.

Example: "*nebraska-*nebraska-Morphic-Remote" -> "*nebraska-Morphic-Remote"

=============== Diff against Nebraska-ul.54 ===============

Item was changed:
+ ----- Method: Color>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: Color>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  | encoded |
 
  CanvasEncoder at: 4 count:  1.
  (encoded := String new: 12)
  putInteger32: (rgb bitAnd: 16rFFFF) at: 1;
  putInteger32: (rgb >> 16) at: 5;
  putInteger32: self privateAlpha at: 9.
  ^encoded!

Item was changed:
+ ----- Method: ColorForm>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: ColorForm>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  "encode into a bitstream for use with RemoteCanvas."
 
  | colorsToSend |
 
  colorsToSend := self colors.
  ^String streamContents: [ :str |
  str
  nextPut: $C; "indicates color form"
  nextPutAll: colorsToSend size printString;
  nextPut: $,.
  colorsToSend do: [ :each |
  str nextPutAll: each encodeForRemoteCanvas
  ].
  str nextPutAll: super encodeForRemoteCanvas
  ].
 
  !

Item was changed:
+ ----- Method: CompositeTransform>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: CompositeTransform>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
  ^String streamContents: [ :str |
  str
  nextPutAll: 'Composite,';
  nextPutAll: '(';
  nextPutAll: globalTransform encodeForRemoteCanvas;
  nextPutAll: ')(';
  nextPutAll: localTransform encodeForRemoteCanvas;
  nextPutAll: ')' ]!

Item was changed:
+ ----- Method: DisplayTransform>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: DisplayTransform>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
  "encode this transform into a string for use by a RemoteCanvas"
  ^self subclassResponsibility!

Item was changed:
+ ----- Method: GradientFillStyle>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: GradientFillStyle>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  ^(DataStream streamedRepresentationOf: self) asString
  !

Item was changed:
+ ----- Method: InfiniteForm>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: InfiniteForm>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  ^patternForm encodeForRemoteCanvas
  !

Item was changed:
+ ----- Method: KeyboardEvent>>decodeFromStringArray: (in category '*nebraska-Morphic-Remote') -----
- ----- Method: KeyboardEvent>>decodeFromStringArray: (in category '*nebraska-*nebraska-Morphic-Remote') -----
  decodeFromStringArray: array
  "decode the receiver from an array of strings"
 
  type := array first asSymbol.
  position := CanvasDecoder decodePoint: (array second).
  buttons := CanvasDecoder decodeInteger: (array third).
  keyValue := CanvasDecoder decodeInteger: array fourth!

Item was changed:
+ ----- Method: KeyboardEvent>>encodedAsStringArray (in category '*nebraska-Morphic-Remote') -----
- ----- Method: KeyboardEvent>>encodedAsStringArray (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodedAsStringArray
  "encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method"
  ^{
  type.
  CanvasEncoder encodePoint: position.
  CanvasEncoder encodeInteger: buttons.
  CanvasEncoder encodeInteger: keyValue asInteger
  }!

Item was changed:
+ ----- Method: MatrixTransform2x3>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MatrixTransform2x3>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
  "encode this transform into a string for use by a RemoteCanvas"
  ^String streamContents: [ :str |
  str nextPutAll: 'Matrix,'.
  1 to: 6 do: [ :i |
  str print: (self basicAt: i).
  str nextPut: $, ].
  ]!

Item was changed:
+ ----- Method: MorphicEvent class>>fromStringArray: (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MorphicEvent class>>fromStringArray: (in category '*nebraska-*nebraska-Morphic-Remote') -----
  fromStringArray: array
  "decode an event that was encoded with encodedAsStringArray"
  | type |
  type := (array at: 1).
  (type = 'mouseMove')
  ifTrue:[^MouseMoveEvent new decodeFromStringArray: array].
  (type = 'mouseDown' or:[type = 'mouseUp'])
  ifTrue:[^MouseButtonEvent new decodeFromStringArray: array].
  (type = 'keystroke' or:[type = 'keyDown' or:[type = 'keyUp']])
  ifTrue:[^KeyboardEvent new decodeFromStringArray: array].
  ^nil!

Item was changed:
+ ----- Method: MorphicTransform>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MorphicTransform>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
  "encode this transform into a string for use by a RemoteCanvas"
  ^String streamContents: [ :str |
  str nextPutAll: 'Morphic,';
  print: offset x truncated;
  nextPut: $,;
  print: offset y truncated;
  nextPut: $,;
  print: scale asFloat;
  nextPut: $,;
  print: angle asFloat
  ]!

Item was changed:
+ ----- Method: MouseButtonEvent>>decodeFromStringArray: (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MouseButtonEvent>>decodeFromStringArray: (in category '*nebraska-*nebraska-Morphic-Remote') -----
  decodeFromStringArray: array
  "decode the receiver from an array of strings"
 
  type := array first asSymbol.
  position := CanvasDecoder decodePoint: (array second).
  buttons := CanvasDecoder decodeInteger: (array third).
  whichButton := CanvasDecoder decodeInteger: (array fourth)!

Item was changed:
+ ----- Method: MouseButtonEvent>>encodedAsStringArray (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MouseButtonEvent>>encodedAsStringArray (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodedAsStringArray
  "encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method"
  ^{
  type.
  CanvasEncoder encodePoint: position.
  CanvasEncoder encodeInteger: buttons.
  CanvasEncoder encodeInteger: whichButton.
  }!

Item was changed:
+ ----- Method: MouseMoveEvent>>decodeFromStringArray: (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MouseMoveEvent>>decodeFromStringArray: (in category '*nebraska-*nebraska-Morphic-Remote') -----
  decodeFromStringArray: array
  "decode the receiver from an array of strings"
 
  type := array first asSymbol.
  position := CanvasDecoder decodePoint: (array second).
  buttons := CanvasDecoder decodeInteger: (array third).
  startPoint := CanvasDecoder decodePoint: (array fourth)!

Item was changed:
+ ----- Method: MouseMoveEvent>>encodedAsStringArray (in category '*nebraska-Morphic-Remote') -----
- ----- Method: MouseMoveEvent>>encodedAsStringArray (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodedAsStringArray
  "encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method"
  ^{
  type.
  CanvasEncoder encodePoint: position.
  CanvasEncoder encodeInteger: buttons.
  CanvasEncoder encodePoint: startPoint.
  }!

Item was changed:
+ ----- Method: Point>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: Point>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  | encoded |
 
  CanvasEncoder at: 3 count:  1.
  encoded := String new: 8.
  encoded putInteger32: x asInteger at: 1.
  encoded putInteger32: y asInteger at: 5.
  ^encoded!

Item was changed:
+ ----- Method: ProjectNavigationMorph>>buttonShare (in category '*nebraska-Morphic-Remote') -----
- ----- Method: ProjectNavigationMorph>>buttonShare (in category '*nebraska-*nebraska-Morphic-Remote') -----
  buttonShare
 
  ^self makeButton: 'Share'
  balloonText: 'Share this project so that others can explore it with you.'
  for: #shareThisWorld
  !

Item was changed:
+ ----- Method: ProjectNavigationMorph>>shareThisWorld (in category '*nebraska-Morphic-Remote') -----
- ----- Method: ProjectNavigationMorph>>shareThisWorld (in category '*nebraska-*nebraska-Morphic-Remote') -----
  shareThisWorld
 
  NebraskaServerMorph serveWorld: self world!

Item was changed:
+ ----- Method: Rectangle>>encodeForRemoteCanvas (in category '*nebraska-Morphic-Remote') -----
- ----- Method: Rectangle>>encodeForRemoteCanvas (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvas
 
  | encoded |
 
  CanvasEncoder at: 2 count:  1.
  encoded := String new: 16.
  encoded putInteger32: origin x asInteger at: 1.
  encoded putInteger32: origin y asInteger at: 5.
  encoded putInteger32: corner x asInteger at: 9.
  encoded putInteger32: corner y asInteger at: 13.
 
  ^encoded!

Item was changed:
+ ----- Method: Rectangle>>encodeForRemoteCanvasB (in category '*nebraska-Morphic-Remote') -----
- ----- Method: Rectangle>>encodeForRemoteCanvasB (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodeForRemoteCanvasB
 
  | encoded |
 
  encoded := Bitmap new: 4.
  encoded at: 1 put: origin x asInteger.
  encoded at: 2 put: origin y asInteger.
  encoded at: 3 put: corner x asInteger.
  encoded at: 4 put: corner y asInteger.
 
  ^encoded!

Item was changed:
+ ----- Method: UserInputEvent>>encodedAsStringArray (in category '*nebraska-Morphic-Remote') -----
- ----- Method: UserInputEvent>>encodedAsStringArray (in category '*nebraska-*nebraska-Morphic-Remote') -----
  encodedAsStringArray
  "encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method"
  ^{
  type.
  CanvasEncoder encodePoint: position.
  CanvasEncoder encodeInteger: buttons.
  }!