[squeak-dev] The Inbox: Kernel-ct.1299.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Feb 17 10:20:51 UTC 2020


Hi Marcel,


> Next time, you could try to not change the formatting too much when making two litttle changes to the code so that others can easily read the diff. In this case, the change of indentation affected all lines but was not necessary.

I see ... Would you recommend to make extra commits to beautify any indentations? Or should we leave them "dirty" forever? :-)

By the way: Maybe Monticello's diffing could also benefit from an #ignoreWhitespace mode.

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 17. Februar 2020 10:48:08
An: Javier Diaz-Reinoso via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1299.mcz

Hi Christoph,

thanks. Next time, you could try to not change the formatting too much when making two litttle changes to the code so that others can easily read the diff. In this case, the change of indentation affected all lines but was not necessary.

Best,
Marcel

Am 16.02.2020 16:26:54 schrieb commits at source.squeak.org <commits at source.squeak.org>:

A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ct.1299.mcz

==================== Summary ====================

Name: Kernel-ct.1299
Author: ct
Time: 16 February 2020, 4:26:42.224 pm
UUID: b1c9f40a-a7ea-9a4e-a502-268cb22592e7
Ancestors: Kernel-tonyg.1293

Refactor #valueSupplyingAnswers::

- Don't reinvent the wheel of Exception >> #pass
- Use #ifError:

See also http://forum.world.st/The-Trunk-Kernel-mt-1283-mcz-td5107403.html.

=============== Diff against Kernel-tonyg.1293 ===============

Item was changed:
----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') -----
valueSupplyingAnswers: aListOfPairs
+ "Evaluate the receiver using a list of questions / answers that might be called upon to automatically respond to Object>>confirm: or FillInTheBlank requests"
- "evaluate the block using a list of questions / answers that might be called upon to
- automatically respond to Object>>confirm: or FillInTheBlank requests"

+ ^ self on: ProvideAnswerNotification do: [ :notification |
+ | caption |
+ caption := notification messageText withSeparatorsCompacted. "to remove new lines"
+ aListOfPairs
+ detect: [ :each |
+ caption = each first
+ or: [ (caption includesSubstring: each first caseSensitive: false)
+ or: [ (each first match: caption)
+ or: [ (caption respondsTo: #matchesRegex:)
+ and: [ [caption matchesRegex: each first] ifError: [false] ] ] ] ] ]
+ ifFound: [ :answer | notification resume: answer second ]
+ ifNone: [ notification pass ] ]!
- ^self
- on: ProvideAnswerNotification
- do: [ :notification |
- | caption |
- caption := notification messageText withSeparatorsCompacted. "to remove new lines"
- aListOfPairs
- detect: [ :each |
- caption = each first
- or: [ (caption includesSubstring: each first caseSensitive: false)
- or: [ (each first match: caption)
- or: [ (caption respondsTo: #matchesRegex:)
- and: [ [caption matchesRegex: each first] on: Error do: [false] ] ] ] ] ]
- ifFound: [ :answer | notification resume: answer second ]
- ifNone: [
- (ProvideAnswerNotification signal: notification messageText)
- ifNil: [ notification resume ]
- ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200217/0af0a059/attachment.html>


More information about the Squeak-dev mailing list