[squeak-dev] The Trunk: Collections-ct.999.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Mar 29 07:58:11 UTC 2022


Hi Christoph --

Thanks. Treat this as a piece of pre-formatted document. It is actually like source code where authors sometimes want to pre-format the linebreaks of a longer comment to not have to fiddle around with window resizing.

I know that some of us tend to remove manual line breaks in such longer comments but we might want to stop doing that if it is easy the retain the original format.

For longer comments without extra line breaks, the following preference can help programmers that have troubles reading other author's source code:

PluggableTextMorph softLineWrap: false.

PluggableTextMorph visualWrapBorder: true.

PluggableTextMorph softLineWrapAtVisualWrapBorder: true.

PluggableTextMorph visualWrapBorderLimit: 80.


That said, it would be nice to have a feature in SmalltalkEditor or TextEditor that converts the soft line breaks of the current text selection into hard line breaks and vice versa.

Then we can more easily preserve both styles of formatting longer commentary. :-)

Best,
Marcel
Am 28.03.2022 22:09:17 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Christoph Thiede uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ct.999.mcz

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

Name: Collections-ct.999
Author: ct
Time: 28 March 2022, 10:08:58.886426 pm
UUID: d938acc0-5012-9649-960f-9b374a010b83
Ancestors: Collections-ct.998

Restores line breaks in Text codeSample that are required indeed for the FontImporterTool.

=============== Diff against Collections-ct.998 ===============

Item was changed:
----- Method: Text class>>codeSample (in category 'filler text') -----
codeSample

+ self flag: #linebreaks. "Samples are used in FontImporterTool and must contain manual linebreaks (visually stable example texts per line)."
^ 'exampleWithNumber: x
+ "A method that illustrates every part of Smalltalk method syntax
+ including primitives. It has unary, binary, and keyboard messages;
+ declares arguments and temporaries; accesses a global variable
+ (but not an instance variable); uses literals (array, nested array,
+ character, symbol, string, integer, float, scaled decimal, and byte
+ array); uses the pseudo variables nil, true, false, self, super, and
+ thisContext; shows that within a literal array nil, true, and false are
+ symbols not pseudo variables; and has sequence, assignment,
+ return, cascade, and tuple (array) creation. It has both zero
+ argument and one argument blocks, and has a block temporary."
- "A method that illustrates every part of Smalltalk method syntax including primitives. It has unary, binary, and keyboard messages; declares arguments and temporaries; accesses a global variable (but not an instance variable); uses literals (array, nested array, character, symbol, string, integer, float, scaled decimal, and byte array); uses the pseudo variables nil, true, false, self, super, and thisContext; shows that within a literal array nil, true, and false are symbols not pseudo variables; and has sequence, assignment, return, cascade, and tuple (array) creation. It has both zero argument and one argument blocks, and has a block temporary."

| y |
true & false not & (nil isNil) ifFalse: [self halt].
y := self size + super size.
#($a #a ''a'' "a" (1 1.0 1.0s2) nil true false), { #[65]. thisContext. nil. true. false }
do: [ :each | | class |
class := each class.
Transcript
show: (class name);
show: '' ''].
^ x < y'!


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


More information about the Squeak-dev mailing list