[squeak-dev] The Inbox: Monticello-lrnp.757.mcz

Lauren Pullen drurowin at gmail.com
Sun Jan 16 17:11:31 UTC 2022

Hello again,

On 1/16/22 00:11, David T. Lewis wrote:
> The produces the subscript out of bounds error that you have addressed.
> However the fix seems to produce some other side effects that I
> do not understand.
I think this one would be better.

It avoids reloading from disk; looks like a #changed: is enough to catch
the model update when it happens in a different window.

This is a pretty quick hack.  Everything is set up correctly so if you
!theRepositoryListMorph verifyContents! it catches the update... but it
never gets called.  Ensuring #verifyContents is called would be better,
but I'm too unfamiliar with Squeak to do it by myself.  At least it gets
rid of the error when you select the zombie.
-------------- next part --------------
'From Squeak5.3 of 30 November 2021 [latest update: #19461] on 16 January 2022 at 10:09:13 am'!

!MCWorkingCopyBrowser methodsFor: 'morphic ui' stamp: 'lrnp 1/16/2022 10:09'!
repositorySelection: aNumber
	aNumber = 0
		ifTrue: [self repository: nil]
		ifFalse: [self repository: ([self repositories at: aNumber]
				on: Error
				do: [:e |
					self flag: #quickHack. "#verifyContents should take care of this"
					(e messageText startsWith: 'subscript is out of bounds')
						ifFalse: [e pass]
						ifTrue: [self changed: #repositoryList. nil]])].
	self changed: #repositorySelection.
	self changedButtons.
! !

More information about the Squeak-dev mailing list