[BUG] book morph, page deletion
Bolot Kerimbaev
bolot at cc.gatech.edu
Tue Sep 7 02:14:22 UTC 1999
To recreate the situation:
1. create a book morph (take it out of the supplies flap)
2. create a new page
3. put something on the second page (to distinguish from first)
4. define transitions between pages (say, dissolve) [essential!]
5. delete first page
boom!
trying to access a non-existent element in ordered collection
Suspect:
BookMorph>>goToPageMorph: newPage transitionSpec: transitionSpec
tries to do
pages at: pageIndex
in a couple of places, and in the debugger, pages shows up as having
only one element. But again, the debugger is pointint at the current
state, which can be misleading (i.e., there is a discrepancy, but the
error had happened elsewhere).
Quick (possible) fix:
Before changing the currentPage := pages at: pageIndex, could do a check
(but this could be ugly).
bolot
More information about the Squeak-dev
mailing list
|