The future of Morphic (Was Re: Shrinking sucks!)

John M McIntosh johnmci at smalltalkconsulting.com
Tue Feb 8 20:29:47 UTC 2005


I've seen some comments about how tweak isn't smalltalk. That shouldn't  
be confused with what tweak can do for you.
I think some examples are in order to expose how easy it is to build  
GUI's in and to indicate the non-traditional smalltalk parts.
Comments about CPlayer and CCostume can come from others.

If for example I create a class subclassed off of CPlayer and want to  
capture a mouse down, change the color of the player, then change back  
to the original color on the mouse up.
I would code this method

onMouseDown
| oldColor |
<on: mouseDown>
oldColor _ color.
color _ Color yellow.
self waitUntil: #mouseUp.
color _ oldColor.


The non-smalltalk part is the <on: mouseDown> which populates a  
dictionary at compile/accept time with the fact that
on a mouseDown event I want this onMouseDown method to be called. I  
could of course populate that dictionary with this information as part
of instantiating an object, but having it here visually ensures we do  
not lose track of doing that and I can clearly see what the  
responsibility of this method is.

So on mouse down this method gets executed asynchronously  , and I set  
the color of the CPlayer which makes it yellow.
Now the question is how do we wait for the mouse up, easy I do the self  
waitUntil: #mouseUp. So execution pauses on this asynchronous process,  
other UI things continue
to run, once the mouse goes up, the color is changed back.

Doing this in morphic would be a lot harder.  Someone is welcome to  
code up an example?

Keep in mind as a replacement for Morphic Tweak is building on lessons  
learned, it's much more mature product and finding things are in most  
cases easy and found where you would expect to find them, versus say  
the mysteries of Morphic.

On Feb 8, 2005, at 11:22 AM, Marcus Denker wrote:

>
> Am 08.02.2005 um 18:56 schrieb Cees de Groot:
>
>> On Tue, 8 Feb 2005 14:19:35 -0300, Juan Vuletich  
>> <jmvsqueak at uolsinectis.com.ar> wrote:
>>
>>> What I'm doing is an eToys-free Morphic. Not sure if my work is of  
>>> any
>>> use in the big image.
>>>
>> I think it is, because as you said, Tweak will be very end-user  
>> oriented as I understand it; it might turn out that a slimmed down  
>> Morphic is just what developers want for tool support and to write  
>> 'closed box' end-user apps in it.
>>
>
> actually, my experience of using Tweak as "just a better morphic" for  
> implementing tools (debugger, browser) has been a very
> pleasent one. And that with zero documentation... quite easy to build  
> GUI's with, even for standard boring bussiness user type
> of stuff I think it's quite nice.
>
>          Marcus
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list