A Variety of Squeak-ish Questions

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Wed Jan 21 21:14:34 UTC 1998


> - What's the easiest way of moving a method from one protocol to another,
> or a class from one category to another?  For the former, I've been
> cutting-pasting code, but I can't figure out how to do the latter.

Moving a method:
* choose "reorganize" from the category list menu, or
* copy the method, change to the new category, paste and accept the method

Moving a class:
* enter the new class category in the class definition and accept

> - I have some ordered collections that contain BlockContexts (e.g., the
> backup jobs list in PWS).  When I inspect the collection, I just see
> "Undefined DoIt".  If I inspect deeper, I can get to the bytecodes, but
> that's just a bit too far for me.  Is there anyway to see what the original
> BlockContext looked like?

The BlockContexts should actually look like "[] in PWS class>>initialize"
and not like "[] in FakeClassPool>>doIt" unless you've added the backup
job manually. Printing these contexts nicely would probably involve
modifying the Decompiler.

> - I'm confused about ChangeSets vs. Projects vs. Change files.  Ted K.
> recently suggested that I look at the Change Sorter, which is a majorly
> cool gadget.  But I suddenly discovered that, in my 1.23 image, I had the
> new things from 1.21 and 1.22 in different change sets.  But I had no
> projects with those names, and I thought that ChangeSets and Projects were
> related.  And then I started wondering how these all resided in the same
> Changes file -- they must, mustn't they?  Is there a paper or something
> that explains all of this?

It's actually fairly simple. Each project has its associated change set,
meaning if you create a new project you also create a new change set.
There is always one active change set (called "Smalltalk changes")
where currently made changes are being recorded. A change set records
_what_ has changed (i.e. a class, a selector in a class etc.) but not
_how_ it has changed. This is only contained in the changes file, meaning
that if you browse for instance "recent versions" of a method the changes
file is scanned backwards for those older versions starting from the
current file location of this method. Note that there is a mark in the
changes file where a previous version of a particular method may be in the
file.

So in the end, there is one change file containing the source of the
various changes, a number of change sets hanging around which record what
has changed and one active change set. Entering a project will just
activate the project's associated change set.

> - What is the maximum size of a DoIt?  I exceeded it today.  I was adding
> students to our PWS-based turnin/grading browser, three lines per student
> and 120 students.  When I tried to select and execute the whole block of
> code, I got an error about "classEncoding not understood" which I didn't
> understand.  I then tried executing the code in three chunks -- and that
> worked fine.  I think I blew up some limit.  Where is that limit?  Is it
> something I can change?

I don't really think that this is a limitation unless you've exceeded one
of the magical 256 element barriers (such as in inst vars, literals or
temps).

Hope this helps.
  Andreas
-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list