[Newbies] MVC programs don't work in Squeak 4.1

David Burton ncdave4life at gmail.com
Sun Jun 13 13:34:59 UTC 2010


First, please forgive me if this is a F.A.Q., but I can't seem to find any
search
facility for this email list.  (Is there one?  Where??)

I last used Smalltalk about 20 years ago, and now I'm trying to port that
old MVC
program to Squeak 4.1 under Windows Vista 32-bit (though "Display version
information"
in VM Preferences says it is 4.0.2 rather than 4.1).

I've run into lots of frustrations with the Squeak user interface,
documentation, etc.,
but I've muddled through.  After fixing various obsolete methods, my program
seemed
to run right up to the point where it sent the open message to the
controller.  Then it
died on the last line of the open method for StandardSystemController.

That method is very short:

open
    "Create an area on the screen in which the receiver's scheduled view can

    be displayed. Make it the active view."

    view resizeInitially.
    status := #open.
    ScheduledControllers scheduleActive: self

It dies sending the scheduleActive: message to class ScheduledControllers.
When I try to step "Into" the method using the debugger, it goes directly to
UndefinedObject(Object)>>doesNotUnderstand: #scheduleActive:

self  is a StandardSystemController.

The class ScheduledControllers isn't even visible in the Browser.

What on earth is going on?  How can the StandardSystemController's open
method
be sending a message to an undefined class?!?

I found a discussion of this problem on the web at
http://objectmix.com/smalltalk/16883-mvc-example-squeak.html
and it seems that Squeak doesn't work with MVC programs unless you
explicitly
open an MVC project.

Well, okay, but how hard would it have been to just put a proper error check
and
helpful message into the open method of StandardSystemController?

So I did Projects -> New Project -> New MVCroject, and I got a blank screen,
with nothing on it at all.  Any of the 3 mouse buttons brings up the same
very short menu.

Since the 3 mouse buttons all do the same thing, I wondered if the Mouse
preferences might be wrong, but I've verified that "3 button mouse" is
selected in VM Preferences.  (I experimentally tried setting it to "1 button
mouse" or both or neither, but nothing made any difference.)

That menu was pretty opaque, but finally I managed to Open Browser.  But
the System Browser looks bad (it's missing the "class" button, for
instance).

When I tried to open file list, the whole Squeak system froze.  (Well, the
mouse cursor moves, but none of the mouse buttons do anything; I had to kill
it with Process Explorer.)

I restarted and tried Open -> file...

This was a little better -- it tried to paint a file browser, but failed
for the most part.  Rolling the mouse wheel up and down revealed some file
names, but nothing would make it do anything with those files.
It painted a big red ugly "accept" button, which I tried clicking, but the
whole Squeak system just froze again.

So... is Squeak unusable for MVC programs?  Or is there some trick that
I don't know?

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100613/9c638bf8/attachment.htm


More information about the Beginners mailing list