Morph Window -> Class? (was: [Newbies] error loading .pr

goran at krampe.se goran at krampe.se
Tue Apr 3 07:31:04 UTC 2007


Hi!

Andrew Dabrowski <dabrowsa at indiana.edu> wrote:
> > AD> Would I be correct in thinking that real Squeak developers must not use
> > AD> the interactive gui-building tools in Squeak because those tools don't
> > AD> produce results that can be easily packaged?
> > 
> > that depends what you mean by packaged.
> > 
> > I packaged means an application you will just deliver an image with
> > the gui set up the way you want it. Nobody cares how you built that
> > gui.
> 
> One drawback of images is that they tend to be quite large.  The .pr 
> files are small so that strikes as better way of distributing programs.

Mmmm, a .pr file is a so called ImageSegment. It needs to be loaded into
an image.
So distributing .pr files only work if the receiver already has an
image. But you knew that I guess. :)

And btw, an ImageSegment is simply a "chunk of objectmemory". Or in
other words a really fast serialization mechanism (fast because it uses
primitives to actually write out the contents of memory for most of its
contents).

> > Personally I start with interactively building a gui (often only a
> > proposal of a gui) and then I switch to code.
> 
> I understand you to mean that you test out an interface design 
> interactively, but then do start over coding the whole gui from scratch 
> in smalltalk.
> 
> That's kind of tragic.  Squeak is wonderful environment for building 
> things, it shouldn't be necessary still do all the coding of the final 
> product textually.  Many WYSIWYG gui builders exist, I would have 
> thought Squeak would be a leader there.

There have been several UI building tools/frameworks over the years. I
can't really comment much on them.
The continuous issue for all UI building tools is of course what the
heck they should produce in the end (code? serialized objects? XML?
etc).

> I think for my purposes (building simple apps, no ambition to be a 
> professional grade developer) I ought to use the 3.8 image and work with 
> projects.  I hope that projects will be supported in later versions of 
> the image.

I think we will have projects for quite some time - but unfortunately
they are not inherently backwards compatible. For example, loading
projects from 3.7 into 3.8 causes problems (due to the new wide String
stuff). This is the current reason SqueakMap only works in 3.8+.
SqueakMap needs to move away from using ImageSegments in order to be
compatible with more Squeak versions.

Btw, if you intend to build "end user regular apps" then you might want
to look into either wxSqueak or possibly even the GtkPlugin:

	http://www.wxsqueak.org/
	http://squeakgtk.pbwiki.com/

Then you can use other UI building tools (Glade etc) to build the UIs.

regards, Göran


More information about the Beginners mailing list