[etoys-dev] Etoys: Etoys-bf.49.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Sep 25 13:13:19 EDT 2010
Bert Freudenberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-bf.49.mcz
==================== Summary ====================
Name: Etoys-bf.49
Author: bf
Time: 25 September 2010, 7:12:20 pm
UUID: 3223c048-95f3-4579-95b9-4176c6db11b7
Ancestors: Etoys-bf.46
Fix decimal places in loaded QuickGuide scriptors
=============== Diff against Etoys-bf.46 ===============
Item was changed:
----- Method: ScriptEditorMorphBuilder>>literal: (in category 'reconstituting scripting tiles ') -----
literal: sexp
| type n lit s xComp yComp |
type _ sexp attributeAt: #type ifAbsent: [].
type ifNotNil: [type _ type asSymbol].
(type == #Player or: [type == #Patch]) ifTrue: [
n _ sexp attributeAt: #value ifAbsent: [].
n ifNotNil: [
n = 'self' ifTrue: [^ TileMorph new setToReferTo: playerScripted].
n = 'nil' ifTrue: [^ TileMorph new setToReferTo: playerScripted presenter standardPlayer].
^ TileMorph new setToReferTo: (context at: n asSymbol)
].
^ TileMorph new setToReferTo: World presenter standardPlayer
].
type == #String ifTrue: [
lit _ sexp attributeAt: #value.
^ (TileMorph new setLiteral: lit).
].
type == #Point ifTrue: [
lit _ sexp attributeAt: #value.
xComp _ lit copyFrom: 1 to: (lit indexOf: $@) - 1.
yComp _ lit copyFrom: (lit indexOf: $@) + 1 to: lit size.
lit _ xComp asNumber at yComp asNumber.
^ (TileMorph new setLiteral: lit).
].
type == #Color ifTrue: [
lit _ Color readFrom: (sexp attributeAt: #value).
^ ColorTileMorph new colorSwatchColor: lit.
].
type == #Boolean ifTrue: [
lit _ (sexp attributeAt: #value) = 'true'.
^ TileMorph new addArrows; setLiteral: lit
].
type == #Sound ifTrue: [
lit _ sexp attributeAt: #value.
^ SoundTile new literal: lit.
].
type == #ScriptName ifTrue: [
lit _ sexp attributeAt: #value.
^ ScriptNameTile new literal: lit asSymbol.
].
(type == #TrailStyle or: [type == #ButtonPhase or: [type == #BorderStyle or: [type == #EdgeMode or: [type == #PatchDisplayMode]]]]) ifTrue: [
lit _ sexp attributeAt: #value.
s _ SymbolListTile new.
s choices: (Vocabulary allStandardVocabularies at: type) choices dataType: type.
^ s setLiteral: lit asSymbol; addArrows.
].
(type == #Object or: [type == #Number]) ifTrue: [
lit _ Number readFrom: (sexp attributeAt: #value).
+ ^ (TileMorph new setLiteral: lit)
+ setDecimalPlacesFromTypeIn: (sexp attributeAt: #value);
+ addArrows.
- ^ (TileMorph new setLiteral: lit) addArrows.
].
(type == #Graphic) ifTrue: [
lit _ (context at: (sexp attributeAt: #value) asSymbol).
^ (GraphicTile new setLiteral: lit).
].
(type == #Menu) ifTrue: [
lit _ sexp attributeAt: #value.
^ (MenuTile new setLiteral: lit).
].
!
Item was added:
+ ----- Method: TileMorph>>setDecimalPlacesFromTypeIn: (in category 'misc') -----
+ setDecimalPlacesFromTypeIn: aString
+ self labelMorph ifNotNilDo: [:m |
+ m setDecimalPlacesFromTypeIn: aString]!
More information about the etoys-dev
mailing list