[Q] Stable Image of MVC?
Boris.Gaertner at gmx.net
Fri Jan 20 19:04:46 UTC 2006
"Sungjin Chun" <chunsj at embian.com> wrote:
> I've managed to create 3.8 version of MVC only image (with Shout +
> Network-Kernel + Some Unicode Korean font). But found that when my
> network server code goes wrong, the whole GUI system seems to be
> wrong. For example, during this state, if I left click to display
> menu, two menus are displayed with cascaded style(wrong!) and I
> cannot select any of its item and windows.
Two unuseable menues at a time indicate that you have problems
with processes. More specifically, that misbehavior indicates (in MVC,
Morphic does not exhibit that behavior) that a forked process
signalled an exception that was not handled by that process.
You an reproduce that problem quite easy:
In a MVC project, open a workspace and evaluate:
[# ( ) at: 3] fork.
you get a red error notification and from that moment on
your GUI is seriously damaged. You should now drop
your image and begin again
When you evaluate
[ [# ( ) at: 3] on: Error
do: [:ex | ]
in an image with undamaged GUI you will not see an error
notification and your GUI remains intact.
> Now, I want to know what version of squeak (MVC) is stable to be used
> for development/debugging and etc?
I think MVC is useable, but it has its limitations and that limitiations
force you to observe some rules. The rule is that, for MVC,
a process should always be provided with a very general
You can do that with the following general method that
should be added to the instance protocol of BlockContext:
" make sure that the process to be forked has a
bullet-proof exception handling. "
^[[ self ] on: Exception
do: [:ex | ]
For your actual application, you have to find out where the
unprotected process is forked. Perhaps somewhere in the network
code? That would be difficult to find. Once you have found that
process, you may think about ways to add a suitable exception handler.
Have you looked into the SqueakDebug.log file? It may
contain some valueable hints.
Note also that processes are not always created with fork.
Sometimes they are created with BolckContext>>newProcess.
I tried these examples also with Squeak 3.2. Here there GUI
remains undamaged, but the error notification does not
pop up immediately.
> Thanks in advance.
Hope that helps
More information about the Squeak-dev