the Difficulty of using squeak

Ross Boylan RossBoylan at
Sun May 15 05:33:33 UTC 2005

On Fri, May 13, 2005 at 08:00:58PM -0400, Lex Spoon wrote:
> Hey guys,
> Thanks for taking the time to desrcibe the pain in detail.  :)  It is
> very helpful for figuring out how to make things easier for new people.
> There is such a thing as "minimum extent" in Morphic but right now it is
> not honored.  Just browse to #minimumExtent to see what I mean!  The

The method comment makes it sound as if it is only honored if you are
using certain layouts.  Are you saying it doesn't even work then?

> answer to that particular question is the following, a method I have
> written many many times at this point for various Morph classes I make 
> :(
> 	extent: aRectangle
> 		^super extent: (aRectangle max: self minimumExtent)
> I wish the root extent: class did this by default.
> Regarding documentation of frameworks, I think the swiki is a great
> place to document them.  It's easy to do and it avoids burdening the
> harvesting process.
> Regarding layouts in general, it sounds like the system just isn't very
> polished right now. 

I think some of what I'm seeing is the result of incomplete
implementations.  For example, the TransformMorph probably should
intercept and translate coordinates for more methods that go through
it.  It doesn't, because in standard useage nobody is trying to pass
coordinates through this morph.

By the way, I did develop a LayoutPolicy of my own, but it wasn't a
cure all.  I guess I could say it was enough to move my main problem
from understanding layout to understand Scrollers.

> I think you are right that these infinite loops can
> happen (and that sort of thing is high on *my*  wish list for making
> Morphic nicer to use--Smalltalk should be a *safe* language that cannot
> screw you up like that if you misstep). 
They are a drag for sure, but it seems hard to avoid them when you're
messing with GUI stuff.  I've dealt with it by putting various tests
before my self halts (if a keyboard modifier is pressed; if this is
the first time; if there has been no interrupt in the last second ...)

That mostly works, although I typically don't do this until after I
lock up my image :)  The other problem is that I have a feeling
sometimes I'm not seeing key logic because it happens during a
different incident than the one I stopped.

> I actually like the two-stage
> logic that you complain about, and I don't see how that would cause
> infinite loops. 
That was a separate problem: the two-stage logic made it hard to debug
the code and understand what was going on.  I'm not saying it's any
harder than any other multi-threaded code, or that it's not a good
thing on balance.  Just that it has some downsides.

> It actually looks like it will help, by separating
> activities into two parts.  First you handle all the events, and then
> you do the layout, and then you do any redrawing that is necessary.  If
> layout happens while events are in the middle of being processed, that
> sounds like a recipe for confusion!
The problem was I wanted to see the layout logic.  I knew it happened
when I resized the window.  So I stuck a halt near the top of the
resize logic.  I then traced it through, but the new layout code never
got hit.  Finally I realized it was happening in a different thread
(hint: try fullBounds),

> Hang in there, guys.  I'm sure you guys will get on your feet soon!  

Thanks.  I should say I have a lot of smalltalk experience, and even a
significant amount of work in squeak/morphic.  Obviously there are
still new worlds to conquer.

> And for the future, I don't think we have a great process for posting
> comments right now.  I guess you could post changesets to Mantis that
> include new class comments?  Then they'll get reviewed and ultimately
> harvested if they sound good.  Also, if anyone is super-eager about
> improving the new-user experience in Squeak, by all means spearhead a
> team to work on that issue.  I'm sure a lot of people will help out if
> someone stepped up to do the grungy organizational workk.
I guess I'll post here if I discover something.  Perhaps the previous
pointers will help some future soul.

> -Lex

Ross Boylan

More information about the Squeak-dev mailing list