[squeak-dev] The Trunk: MorphicExtras-mt.281.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Dec 16 11:30:15 UTC 2020


Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-mt.281.mcz

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

Name: MorphicExtras-mt.281
Author: mt
Time: 16 December 2020, 12:30:12.371306 pm
UUID: bf976862-6782-48d3-a408-0bc2229d9e3f
Ancestors: MorphicExtras-mt.280

(Recovers contents from inaccessible MorphicExtras-ct.2?82 from Inbox.)

Adds Workspace examples for demonstration of Editor and Text.Reuploaded to fix bad dependency in #extraExample1 (it has to be #asTextFromHtml instead of #asHtmlText). Replaces MorphicExtras-ct.276, which can be moved to the treated inbox.

This commit is part of reconstruction of Objectland (also known as "The Worlds of Squeak"). For more information, see: http://forum.world.st/The-Inbox-MorphicExtras-ct-267-mcz-td5104764.html

=============== Diff against MorphicExtras-mt.280 ===============

Item was added:
+ ----- Method: Workspace class>>extraExample1 (in category '*MorphicExtras-examples') -----
+ extraExample1
+ 	"ToolBuilder open: Workspace extraExample1"
+ 
+ 	| quoteAttributes |
+ 	quoteAttributes := {TextEmphasis bold. TextColor color: Color mocha}.
+ 	^ Workspace new
+ 		contents: (Text streamContents: [:stream | ({
+ 			'<i>"When in doubt, try it out!!"</i>' asTextFromHtml
+ 				addAllAttributes: quoteAttributes;
+ 				yourself.
+ 			'-- Dan Ingalls' asText
+ 				addAllAttributes: quoteAttributes;
+ 				addAttribute: TextAlignment rightFlush;
+ 				yourself.
+ 			String empty. }
+ 			, ((self class sourceCodeAt: #extraExampleContents1) asString lines allButFirst: 3)
+ 				do: [:line | stream nextPutAll: line]
+ 				separatedBy: [stream cr])]);
+ 		shouldStyle: false;
+ 		yourself!

Item was added:
+ ----- Method: Workspace class>>extraExample2 (in category '*MorphicExtras-examples') -----
+ extraExample2
+ 	"ToolBuilder open: Workspace extraExample2"
+ 
+ 	^ self new
+ 		contents: (((self class sourceCodeAt: #extraExampleContents2)
+ 			asString lines allButFirst: 3)
+ 				joinSeparatedBy: Character cr);
+ 		yourself!

Item was added:
+ ----- Method: Workspace class>>extraExampleContents1 (in category '*MorphicExtras-examples') -----
+ extraExampleContents1
+ 	"This is example code for #extraExample1"
+ 
+ "Run the following lines by pressing <cmd>d:"
+ Transcript showln: 'Hello world!!'.
+ self inform: 'This is a dialog box. Quite easy, isn''t it?'.
+ 
+ "Print the result of an expression using <cmd>p"
+ 6 * 7.
+ Float pi i exp stringForReadout.
+ (16 factorial + 1) isPrime.
+ (Smalltalk allClasses gather: #selectors) size.!

Item was added:
+ ----- Method: Workspace class>>extraExampleContents2 (in category '*MorphicExtras-examples') -----
+ extraExampleContents2
+ 	"This is example code for #extraExample2"
+ 
+ "Inspect any (sub)expression result by pressing <cmd>i"
+ (20 to: 40 by: 2) asOrderedCollection
+ 	addFirst: 16;
+ 	addLast: 42;
+ 	sort: [:x | x \\ 3] descending;
+ 	yourself.
+ 
+ "Explore any (sub)expression result by pressing <cmd>I"
+ Project current world.
+ 
+ "Debug any (sub)expression using <cmd>D"
+ (1 to: 9) join asNumber sqrt truncateTo: 1e-3.
+ (SystemWindow windowsIn: ActiveWorld)
+ 	select: [:window | window bounds isWide]
+ 	thenDo: [:window | window color: window color negated].!



More information about the Squeak-dev mailing list