Etoys: Morphic-kfr.74.mcz

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

Etoys: Morphic-kfr.74.mcz

commits-2
Karl Ramberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-kfr.74.mcz

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

Name: Morphic-kfr.74
Author: kfr
Time: 11 February 2012, 11:08:17 am
UUID: e206c1e1-13de-184f-99f6-ae894d07b353
Ancestors: Morphic-Richo.73

Deficient support for Point-valued variables
http://tracker.squeakland.org/browse/SQ-1012

=============== Diff against Morphic-Richo.73 ===============

Item was changed:
  ----- Method: UpdatingStringMorph>>acceptValueFromTarget: (in category 'target access') -----
  acceptValueFromTarget: v
+ "Accept a value from the target.  Answer the string rendition of the value."
- "Accept a value from the target"
 
  lastValue _ v.
  self format == #string ifTrue: [^ v asString].
  self format == #symbol ifTrue: [^ v asString fromCamelCase translated].
  (format == #default and: [v isNumber]) ifTrue:
  [^ self stringForNumericValue: v].
+ (format == #default and: [v isPoint]) ifTrue:
+ [^ self stringForPointValue: v].
  ^ v printString translated!

Item was added:
+ ----- Method: UpdatingStringMorph>>stringForPointValue: (in category 'target access') -----
+ stringForPointValue: aValue
+ "Answer a suitably-formatted string representing the value."
+
+ ^ (aValue x printShowingDecimalPlaces: self decimalPlaces), ' @ ', (aValue y  printShowingDecimalPlaces: self decimalPlaces)!

Item was changed:
  ----- Method: UpdatingStringMorph>>valueFromContents (in category 'accessing') -----
  valueFromContents
  "Return a new value from the current contents string."
 
  format = #symbol ifTrue: [^ lastValue].
  format = #string ifTrue: [^ contents].
+ (owner notNil and: [owner isMemberOf: NumericReadoutTile]) ifTrue:
+ [^ (owner hasProperty: #PointValued)
+ ifTrue:
+ [Point readEToyPointFrom: contents]
+ ifFalse:
+ [Number readEToyNumberFrom: contents]].
 
+ (target isMorph and: [target owner isKindOf: TilePadMorph])
+ ifTrue:
+ [(target owner type = #Number)
+ ifTrue: [^ Number readEToyNumberFrom: contents].
+ (target owner type = #Point)
+ ifTrue: [^ Point readEToyPointFrom: contents]].
- (owner notNil and: [owner isMemberOf: NumericReadoutTile]) ifTrue:
- [^ Number readEToyNumberFrom: contents].
 
+ ^ [Compiler evaluate: contents] ifError: [nil]!
- target isMorph ifTrue: [target owner ifNotNil:
- [((target owner isMemberOf: TilePadMorph) and: [target owner type = #Number])
- ifTrue: [^ Number readEToyNumberFrom: contents]]].
-
- ^ [Compiler evaluate: contents] ifError: [nil]
- !

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev