[BUG][FIX][MVC] PluggableListView verifyContents

Boris Gaertner Boris.Gaertner at gmx.net
Thu Jan 22 18:16:54 UTC 2004


This bug report is for Squeak 3.7 alpha latest update #5657
(and also for earlier versions back to Squeak 2.7 latest update #1782)
To see the bugs that are described in this bug report,
you have to enter an MVC project. The problem is not
present in Morphic.

I claim that method PluggableListView>>verifyContents
has two deficiencies.
The demonstration of these requires some preparatory
work. For your convenience, I prepared the files
demo1.cs and demo2.cs which ARE NOT FIXES.

File ListViewVerificationFix.1.cs is a proposal for
a fix.

First problem: 
1. Open a class browser and a file list.
2. In the file list, select demo1.cs and file it in
( both 'file in entiere file' and 'install into new change set'
will do)
The file contains a class definition that introduces
the class category 'CrazyDemo-byBoris' 
It is essential that this class category does not exist
in your image before you file in the change set!
3. go to the browser and scroll the call category view
down. You will see that the lines that come into view
are displayed black on a white background.

Second problem
1. Open a class browser and select class category
'Kernel-Magnitudes' You see six classes in that
category. Resize the browser to a size that
is sufficient to display the names of at least seven
classes. DO NOT SELECT A CLASS!
2. In the file list, select demo2.cs and file it in
( both 'file in entiere file' and 'install into new change set'
will do)
The file contains a class 'CrazyUselessDemo' in
category 'Kernel-Magnitudes'
3. Go to the browser. The class names view
flashes, but the new class is not displayed.
4. Resize or move the browser: Now the new
class is displayed.

When you activate a browser, the following
chain of messages is sent:

StandardSystemController>>controlInitialize
CodeHolder>>modelWakeUpIn:
CodeHolder>>updateListsAndCodeIn:
Object>>updateListsAndCodeIn:
PluggableListView>>verifyContents

verifyContents fetches the list that it will display
and creates a new a new ListParagraph (in method list:)
However, a foreground color and a background
color are not assigned to this list pargaraph (this is
done in ListView >>displayView) Scrolling
(listView>>scrollBy:) does not set the colors and this
explains the loss of colors in example 1.

The error of the second example is caused by the fact
that verifyContents does not redisplay the changed list
when no selection was made.

I think the problems are best fixed by use of those
display methods that are also sent from 
PluggableListView>>update:
Therefore my proposal
1. deletes the old selection index,
2. displays the view without a selection
3. uses update: to fetch and to display the
current selection.


Greetings,
Boris











-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo2.cs
Type: application/octet-stream
Size: 625 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040122/37cba388/demo2.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo1.cs
Type: application/octet-stream
Size: 3922 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040122/37cba388/demo1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ListViewVerificationFix.1.cs
Type: application/octet-stream
Size: 1238 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040122/37cba388/ListViewVerificationFix.1.obj


More information about the Squeak-dev mailing list