Apology
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Wed Nov 1 00:22:06 UTC 2000
I wrote
>I *did* find a bug while poking around (try inspecting
>Week fromDate: (Date today), select self, and then choose Explore;
>you'll get a MessageNotUnderstood) but didn't describe it.
Bob Arning replied
Well, could you describe it? I tried it in 2.8 and 2.9 and saw
no MessageNotUnderstood.
Here goes.
Start Squeak 2.8 (on a PowerMac 7600/120 runing MacOS 8.6) by
double-clicking on the image. Big window opens containing
Welcom To, Getting Started, and 8 Play With Me windows.
Open a workspace. In that workspace type
Week fromDate: (Date today)
and type cmd-I.
That opens an inspector window with title Week; the left hand pane
lists self, all inst vars, julainDayNum(ber cut off) and the right
hand pane as yet displays nothing.
Select self in the left hand pane, press Option-Mouse (operate button),
and choose explore (I).
Up pops a pink
MessageNodeUnderstood: asJulianDayNumber
--[Proceed]--[Abandon]--[Debug]---------
UndefinedObject(Object)>>doesnotUnderstand:
Week(Date)>>=
[] in SimpleHierarchicalListMorph>>selection:
Array(SequenceableCollection)>>findFirst:
...
Now click on Debug. We find that we're in
Week(Date)>> = aDate
and that aDate is nil. That's because
SimpleHierarchicalListMorph>>
selection: item
"called from outside to request setting a new selection.
Assumes scroller submorphs is exactly our list.
Note: MAY NOT work right if list includes repeated items"
| i |
i _ scroller submorphs findFirst: [:m | m complexContents == item].
i > 0 ifTrue: [^self selectionIndex: i].
i _ scroller submorphs findFirst:
[:m | m withoutListWrapper = item withoutListWrapper].
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self selectionIndex: i
passed nil, and the reason that happened is that item was nil and
Object>>withoutListWrapper returns self. i was 0, and m was
an IndentingListItemMorph wrapped around the Week object.
All the SimpleHierarchicalListMorph stuff was called eventually from
ObjectExplorer>>explorerFor: (the Week object).
For what it's worth, it doesn't matter whether I used Cmd-I or click
on the "explore (I)" menu item, but it does matter which class the
object belongs to. I can explore a String this way, but not a Date
or a Week.
More information about the Squeak-dev
mailing list
|