Benjamin,
{EllipseMorph. RectangleMorph} atRandom new.
Is a nice solution.
Thanky you for your very helpfull answer.
- Jeroen
"Benjamin Schroeder" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> On Jun 22, 2006, at 7:07 PM, Jeroen van Hilst wrote:
>
> > I've tried something li
On Jun 22, 2006, at 7:07 PM, Jeroen van Hilst wrote:
I've tried something like:
(#(EllipseMorph RectangleMorph) at: (2 atRandom)) new.
But thats too silly ? Is there some connection to get a class from
a symbol
? Or is that the wrong direction ?
I like your approach. I think using the #(
Best List,
Im very curious to the the 'smalltalk way' to write the following code:
| shape morph |
(2 atRandom == 1)
ifTrue: [shape := RectangleMorph]
ifFalse: [shape := EllipseMorph].
morph := shape new.
I've tried something like:
(#(EllipseMorph RectangleMorph) at: (2 atRandom)) new.
But tha
List,
haven't you heard that Smalltalk and Squeak do not directly support
multiple inheritance, time and again? But that Perl, Python and Ruby do
(to some extent)?
- http://www.google.com/search?q=python+ruby+multiple+inheritance
Well, that is not the case for Smalltalk since the time that
Greetings,I'm working through http://www.maartensz.org/computing/squeak/Helps/Environment/Workspaces4.htm and
(EmphasizedMenu
selections: #('bold' 'plain' 'italic' 'struckout' 'plain' 'nice menu!')
emphases: #(bold plain italic struckOut plain bold))
startUpGives me the "MessageNotUnderstood" er
Hi,I've just installed Squeak3.8-MacOS-Full and I noticed that SqueakV3.sources has a date modified of Feb 5, 2040, 9:28 PM I know Squeak is "ahead of its time" and I'm really impressed, but don't know what it means. Should I worry?
-- Tom"Ecrasez l'Infame!" -- Voltaire
Adaptor isn't so popular of a pattern in Smalltalk because its easy to simply
adapt a class by implementing the desired protocol in a category. People seldom
bother to create a new class just to adapt something.
On Thursday, June 22, 2006, at 05:40AM, Mathieu SUEN <[EMAIL PROTECTED]> wrote:
>20
Yes, I mean, I didn't want to say that every wrapper class is an
Adaptor. Just that in my experience, if you want to find examples of
adaptors, looking through wrapper classes might yield you some examples.
And indeed, up until a certain point adaptors and decorators might
look similar. Ada
2006/6/22, Roel Wuyts <[EMAIL PROTECTED]>:
I can sing and dance :-)
Given more time
Of course! No problem.
For the Adaptor thing, any wrapper class will do. There have to exist
such classes in Squeak. Doing a search for classes that ends in
Wrapper will probably yield some examples.
Ok I
I can sing and dance :-)
Given more time I could even try to detect you all kinds of pattern
instances, but for that we'd need to port Soul to Squeak again.
For the Adaptor thing, any wrapper class will do. There have to exist
such classes in Squeak. Doing a search for classes that ends in
Yes, :-)
Do Roel Wuyts can do something for us?
;-)
2006/6/22, stéphane ducasse <[EMAIL PROTECTED]>:
In fact it would be really nice to have a list of the pattern usage.
Stef
> Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
>> Hi,
>>
>> I was wondering were I can find
In fact it would be really nice to have a list of the pattern usage.
Stef
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
Hi,
I was wondering were I can find some concret exemple of Decorator
pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
And a
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
> Hi,
>
> I was wondering were I can find some concret exemple of Decorator
> pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
> And also:Adapter(I don't really understand the use of it)
This I don't know.
13 matches
Mail list logo