[MultimediaApps] Presentation system and SqueakNews

Hannes Hirzel hirzel at spw.unizh.ch
Fri Jul 27 20:53:55 UTC 2001


Hi Tansel,

Thanks for your detailed answer with the observations you made developing
Squeak News.
This is the second mail this evening. Actually the first was meant to be
private but
didn't made it.

>Project numbers can be quite large (we tested over 100 projects) and it
only has a minor affect >in how much memory you are using (reasonably low
overhead) , but what's in these projects really >impact the size. We found
that large bitmap images increase size significantly. Initially we had a
nice background image, used for each project in the e-zine, it turned out
it bumped the size about 2MBs per project so we had to take the background
out.


Shared Background Images for Many Projects
------------------------------------------

>BTW is there an easy way of sharing one image as a background in many
projects and repainting >from that common source instead of storing it
with each project?


The topmost morph of a project is stored in the local variable world of
the project instance.
It is an instance of PasteUpMorph. It has an instance variable
backgroundMorph, however it
seems that this is not used yet. Instead an InfiniteForm is stored in the
instance variable
color.
I went to 
FileList>>openAsBackground
and found

(Form fromFileNamed: self fullName) setAsBackground

In class Form>>setAsBackground I found that this form
is converted to an InfiniteForm and assigned to the instance variable
'color' of the
World PasteUpMorph.

The solution is as follows

- Open a project
- Open a file list browser
- Look for a background graphics file which will serve as the background
image
- Yellow-click and choose 'open as background'
- Open a Workspace and type 'World'.
- Inspect it.
- Type into the evaluation pane:
    MyGeneralBackground _ self color.   
- Close the inspector and open another project
- Bring up againg an inspector on the 'World'
- Evaluate in the code pane of the inspector
     self color: MyGeneralBackground
- Voila: You have the same background as in the previous project but still
only one
  background form instance. 

Note: Look at the class comment of PasteUpMorph. The class is still work
in progress.
This explains why the programmer of this class used the instance variable
'color' to
store a background picture. Or perhaps there are other reasons.




Managing large images with many projects
----------------------------------------

>You can export all projects as image segments by using:
>
>    Project storeAllInSegments

I used this with a copy of my image to find out which are the large
projects.
For this I just looked at the file size in the '<image name>_segs'
directory. 
There might be a Squeak only way to find out the large projects but I'm
not 
aware of that solution.

I then went back to my actual working image and used 

(Project named: 'ProjectA') storeSegment
(Project named: 'ProjectB') storeSegment

where 'ProjectA' and 'ProjectB' were the actual project names.
This stores these projects in segments thus making the main image
smaller. This helped me
to proceed.



>You can also keep your project in the disk as a .pr file and load it in
demand with
>    ProjectLoading>>openFromDirectory:andFileName:
>but this is considerably slower and not transparent as it is from image
segments.
Are there advantages of this approach? What would be the context of using
it?





Squeak presentation system
--------------------------

>Most of the Squeak News July issue presentation features were quick hacks
but we are working on >a set of electronic publishing tools, among them a
project template system which you can define >template projects and when
creating a new project you can tell it to look like one of those
>templates. Once they are ready then I'll publish them along with
documentation as a "guided >backstage tour" of the e-zine.

This will be very interesting! I'm looking forward to it.


>Currently the presentation power Squeak has would beat most presentation
systems hands down but >it is not as easy as a presentation tool to access
to some of these features.

Yes, that summarizes the situation. Squeak has a lot of expressive power,
but simple things are often not easy accessible or even bugs come
up. Actually to fix them or find workarounds is often possible quite easy
and the people on this list are very helpful. That's unrivaled compared to
other tools.


Proposal for filling up the space of the CDROM
----------------------------------------------
If there is some space left on the SqueakNews CDROM I would propose to use
it as
an additional distribution medium for different configurations of the
Squeak releases.
The discussion the last days on this list about #majorShrink (actually how
to come
up with different configurations of images) prompted this idea. I think
that there 
would be people solely subscribing for the reason to avoid fiddeling
around with 
different shrinking scripts. It needs considerable know how.



Cheers
Hannes Hirzel


ICT department / University of Zurich, Switzerland






More information about the Squeak-dev mailing list