[squeak-dev] The Trunk: EToys-fbs.102.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jul 6 15:06:54 UTC 2013
Frank Shearar uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-fbs.102.mcz
==================== Summary ====================
Name: EToys-fbs.102
Author: fbs
Time: 6 July 2013, 4:06:16.661 pm
UUID: 782b6d00-6f6d-ca45-9b91-866718002593
Ancestors: EToys-dtl.101
All the other #stringFor: implementors live in*Etoys-tiles.
=============== Diff against EToys-dtl.101 ===============
Item was added:
+ ----- Method: MessageSend>>stringFor: (in category '*Etoys-tiles') -----
+ stringFor: anObject
+ "Return a string suitable for compiling. Literal or reference from global ref dictionary. self is always named via the ref dictionary."
+
+ | generic aName |
+ anObject isLiteral ifTrue: [^ anObject printString].
+ anObject class == Color ifTrue: [^ anObject printString].
+ anObject class superclass == Boolean ifTrue: [^ anObject printString].
+ anObject isBlock ifTrue: [^ '[''do nothing'']']. "default block"
+ "Real blocks need to construct tiles in a different way"
+ anObject class isMeta ifTrue: ["a class" ^ anObject name].
+ generic := anObject knownName. "may be nil or 'Ellipse' "
+ aName := anObject uniqueNameForReference.
+ generic ifNil:
+ [(anObject respondsTo: #renameTo:)
+ ifTrue: [anObject renameTo: aName]
+ ifFalse: [aName := anObject storeString]]. "for Fraction, LargeInt, etc"
+ ^ aName
+ !
More information about the Squeak-dev
mailing list
|