[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] small fixups to the tutorial

From: Mathias Laurin
Subject: [Help-smalltalk] small fixups to the tutorial
Date: Tue, 23 Jan 2018 21:02:47 +0100

Hi list,

Zecke told me that I should send my patches to the mailing list,
so here I am.

I am half through the online tutorial now and I would have a few
more typos, formatting, stuttering, and whitespace fixes. I have
grouped them in a single patch: `typos_and_whitespace.diff`.

Also, the `Checking` class' `printOn:` message (section 6.6.2)
prints the `'` marks. The changes in
`improved_checking_printon.diff` use the `stream nextPutAll`
already introduced in 6.4.5 for a better looking `printOn:`.

Also, I think that it could be a good idea to remove the
blank lines from the code examples, here is what I mean:

        --- a/doc/tutorial.texi
        +++ b/doc/tutorial.texi
        @@ -1467,19 +1467,15 @@ more sanity checks to the writing of checks.
            writeCheck: amount [
                <category: 'spending'>
                | num |
                "Sanity check that we have checks left in our checkbook"
                (checksleft < 1)
                    ifTrue: [ ^self error: 'Out of checks' ].
                "Make sure we've never used this check number before"
                num := checknum.
                (history includesKey: num)
                    ifTrue: [ ^self error: 'Duplicate check number' ].
                "Record the check number and amount"
                history at: num put: amount.
                "Update our next checknumber, checks left, and balance"
                checknum := checknum + 1.
                checksleft := checksleft - 1.

because it would allow users to copy and paste the examples
directly in a live interactive session. If you agree, I can make
another patch.

Finally, I am not sure whether I should write to the Changelog
or you do it... I have not done it.

In any case, thank you for the very nice tutorial!

Best regards,

Attachment: improved_checking_printon.diff
Description: Binary data

Attachment: typos_and_whitespace.diff
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]