(Resending since it didn't show up on the list overnight)
What is the best way to implement enumerations in Smalltalk. For
instance, for a UML definition of...
enumeration Currency
enum USD 'US dollar'
enum EUR 'Eueropean euro'
enum AUD'Australian dollar'
here is my guess,
That is not bad. However, EpcimCurrency needs more behavior on the
instance side. In particular, a currency should know both its name
and its description. i think value is just the name. The
dictionary should map names to currencies instead of names to strings
(or descriptions), and the
On 01/04/2012 01:01 PM, Göran Krampe wrote:
I would in this case use a so called SharedPool. If you are using Squeak
then take for example a look at GZipConstants (inherits from SharedPool,
has classVariablesNames for each key, initialize them in class side
initialize method) and a use of it in
Hey,
I'm currently developing a small game with Squeak. Part of it is a bunch
of menus which should have background images. Therefore I have realized
them as ImageMorphs with the respective images.
Now, there are menus which sizes are determined dynamically during the
runtime of the game.
A SketchMorph lets you set the extent directly
Karl
On Wed, Jan 4, 2012 at 4:44 PM, Jan Teske
jan.te...@student.hpi.uni-potsdam.de wrote:
Hey,
I'm currently developing a small game with Squeak. Part of it is a bunch
of menus which should have background images. Therefore I have realized
What is the best way to implement enumerations in Smalltalk. For
instance, for a UML definition of...
enumeration Currency
enum USD 'US dollar'
enum EUR 'Eueropean euro'
enum AUD'Australian dollar'
here is my guess, consisting of 2 instance side methods and 3 class side
In addition, you might consider using symbols for the name rather than
strings.
On Wed, Jan 4, 2012 at 3:33 AM, Ralph Johnson john...@cs.uiuc.edu wrote:
That is not bad. However, EpcimCurrency needs more behavior on the
instance side. In particular, a currency should know both its name
A sketchmorph is horribly complicated, too.
ImageMorph was designated as the successor to SketchMorph and then
abandoned. By implication, SketchMorph was abandoned before ImageMorph.
Far better to figure out a way to resize ImageMorph, IMHO.
L.
On 1/4/12 8:59 AM, karl ramberg wrote:
A
Hi,
I have read that method of object is object itself. So my question is, how
can I send message to that object? Is there for example possibilty to send
message to the method to decompile itself and show its code? What is method
subclass of?
Jan
___
On Wed, 4 Jan 2012, Ben Coman wrote:
When I define...
Float subclass: MyPrefixFloat
I guess you meat Float subclass: #MyPrefixFloat .
why does it get changed to...
Float variableWordSubclass: #MyPrefixFloat
Float is already a variableWordSubclass, so its subclasses must also be
On Wed, 4 Jan 2012, Garret Raziel wrote:
Hi,
I have read that method of object is object itself. So my question is, how
can I send message to that object? Is there for example possibilty to send
message to the method to decompile itself and show its code? What is method
subclass of?
Copy this
I see your point but I don't think it's worth the hassle unless one wanted
to bring ImageMorph futrher on by implementing the needed methods.
Karl
On Wed, Jan 4, 2012 at 8:25 PM, Lawson English lengli...@cox.net wrote:
A sketchmorph is horribly complicated, too.
ImageMorph was designated as
12 matches
Mail list logo