[squeak-dev] The Inbox: Monticello-lrnp.757.mcz
eliot.miranda at gmail.com
Tue Jan 18 20:36:09 UTC 2022
On Sun, Jan 16, 2022 at 11:11 AM Lauren Pullen <drurowin at gmail.com> wrote:
> On 1/16/22 16:47, David T. Lewis wrote:
> > In any case I suspect that the fix for
> > might better not try to reload the repository list. Maybe it is
> > sufficient to just refresh the list in the browser. Using a call
> > to "self changed" #repositoryList" seems to address the problem
> > that I saw.
> > Lauren, what do you think? Here is what I tried in my image:
> > repositorySelection: aNumber
> > aNumber = 0
> > ifTrue: [self repository: nil]
> > ifFalse: [self repository: ([self repositories at: aNumber]
> > on: Error
> > do: [:e | self changed:
> > self changed: #repositorySelection.
> > self changedButtons.
> I didn't see your reply. Operator error.
> On a somewhat-related note...
> I don't fully understand Smalltalk's exception handling system (I come
> from common lisp), so I have a question. In the error handler block, is
> the handlerBlock return used as the expression's return value? I
> explicitly say nil in my patch since #changed: returns self. From your
> code, it doesn't look like this is needed.
The value of an on:do: is the value of the receiver block, unless an error
which matches the argument to the on: keyword occurs, in which case the
value is that of the do: block. Note that the value of an empty block is
Note that, like Common Lisp, the exception has resume semantics so the do:
block is evaluated within the context if the exception, and within the do:
block one can return a value from the exception (providing it is resumable,
see Exception>>#isResumable) by sending teh exception resume: or resume;
see Exception>>#resume & Exception>>#resume:.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev