[squeak-dev] The Trunk: Help-Squeak-Project-tpr.52.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 30 23:33:30 UTC 2018


tim Rowledge uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-tpr.52.mcz

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

Name: Help-Squeak-Project-tpr.52
Author: tpr
Time: 30 May 2018, 4:33:17.818963 pm
UUID: 04231217-90de-4966-813e-e4c3f23934ce
Ancestors: Help-Squeak-Project-mt.51

Update some help related methods

=============== Diff against Help-Squeak-Project-mt.51 ===============

Item was changed:
  ----- Method: SqueakHelp class>>introduction (in category 'pages') -----
  introduction
  	"This method was automatically generated. Edit it using:"
+ 	"SqueakHelp edit: #introduction"
- 	"a HelpBrowser edit: #introduction"
  	^HelpTopic
  		title: 'Welcome'
  		contents: 
+ 'Welcome to Squeak
- 'Welcome to Squeak (http://www.squeak.org)
  
+ Visit http://www.squeak.org for the lastest information.
- Squeak is an open-source Smalltalk programming system with fast execution environments for all major platforms. It features the Morphic framework, which promotes low effort graphical, interactive application development and maintenance. Many projects have been successfully created with Squeak. They cover a wide range of domains such as education, multimedia, gaming, research, and commerce.
  
+ Squeak is an open-source Smalltalk programming system available for all major platforms. It features the Morphic framework, which promotes low effort graphical, interactive application development and maintenance. Many projects have been successfully created with Squeak in a wide range of domains such as education, multimedia, gaming, research, and commerce. Squeak is fast, flexible and free.
+ 
  It''s Smalltalk!!!!
  Everything is an object. Objects collaborate by exchanging messages to achieve the desired application behavior. The Smalltalk programming language has a concise syntax and simple execution semantics. The Smalltalk system is implemented in itself: Compiler, debugger, programming tools, and so on are all Smalltalk code the user can read and modify. Novice programmers can get started easily and experts can engineer elegant solutions at large.
  
  Morphic UI Framework
  All graphical objects are tangible and interactively changeable. This promotes short feedback loops and low-effort application development. Morphic thus leverages the live programming experience of traditional Smalltalk environments from a mainly text-focused domain to a graphical one.
  
  Powerful Tooling
  The dynamic Squeak environment provides a variety of tools for browsing, writing, executing, and versioning Smalltalk code. Multiple debugging sessions can be served concurrently. Thanks to Morphic, tool customization can be achieved with reasonable effort.
  
  Fast Virtual Machine
  There are several fast Squeak VMs that also support other languages of the Smalltalk family. Meta-tracing, just-in-time compilation, stack-to-register mapping, and aggressive in-line message caching yield efficiency in executing Smalltalk byte code.
  
  Web Development
  With frameworks like Seaside and AIDA, Squeak can be a web server. It provides a layered set of abstractions over HTTP and HTML that let you build highly interactive web applications quickly, reusably,` and maintainably.
  
  Multi-Platform Support
+ Squeak supports Windows, Linux (X86, X64 and ARM), and OS X and is preinstalled on C.H.I.P., Raspberry Pi, and OLPC XO.!!
+ ]style[(19 5 1 21 29 399 15 18 6 36 8 87 14 80 8 2 8 2 17 161 20 27 8 254 16 64 8 11 9 6 10 152 20 252 15 22 7 5 4 18 3 164 22 120)a0b,a0,a0b,Rhttp://www.squeak.org;,a0,,i,,Rcode://Object;,,Rcode://MessageSend;,,Rcode://HelpBrowser openForCodeOn: TerseGuideHelp;,,Rcode://Compiler;,,Rcode://Debugger;,,Rcode://Browser;,,i,,Rcode://Morph new openInHand;,,i,,Rcode://ToolSet browse: String selector: #findTokens:;,,Rcode://7/0;,,Rcode://MCWorkingCopyBrowser new show;,,i,,i,,Rhttp://www.seaside.st/;,,Rhttp://www.aidaweb.si/;,,Rcode://WebClient;,,i,!!' readStream nextChunkText!
- Squeak supports Windows, Linux, and OS X and is preinstalled on C.H.I.P., Raspberry Pi, and OLPC XO.!!
- ]style[(18 1 21 1 396 15 18 6 36 8 87 14 80 8 2 8 2 17 161 20 27 8 254 16 64 8 11 9 6 10 152 20 252 15 22 7 5 4 18 3 164 22 101)a0b,a0,Rhttp://www.squeak.org;,a0,,i,,Rcode://Object;,,Rcode://MessageSend;,,Rcode://HelpBrowser openForCodeOn: TerseGuideHelp;,,Rcode://Compiler;,,Rcode://Debugger;,,Rcode://Browser;,,i,,Rcode://Morph new openInHand;,,i,,Rcode://ToolSet browse: String selector: #findTokens:;,,Rcode://7/0;,,Rcode://MCWorkingCopyBrowser new show;,,i,,i,,Rhttp://www.seaside.st/;,,Rhttp://www.aidaweb.si/;,,Rcode://WebClient;,,i,!!' readStream nextChunkText!

Item was changed:
  ----- Method: SqueakLicenseHelp class>>licenseChange (in category 'pages') -----
  licenseChange
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakLicenseHelp edit: #licenseChange"
  	^HelpTopic 
  		title: 'License has changed with 4.0'
  		readOnlyContents: 'On 23 September 1996, Apple Computer Inc. released Squeak V1.1 under the "Squeak License" (SqL).
  
  On May 8, 2006 Apple agreed to relicense original Squeak V1.1 under the Apple Public Source License.
  
  On October 12, 2006 Apple granted permission to relicense under Apache license 2.0.
  
  In 2006, VPRI began to collect "Distribution Agreements" for all contributors to Squeak since V1.1 up to V3.8, asking them to relicense their contributions, which were originally licensed under SqL, to the MIT license. This was a great effort on behalf of many and VPRI has 100s of signed documents agreeing to this.
  
  Do you want to contribute source to Squeak?All new contributions since 4.0 must be under the MIT license. When you make your code available, please state explicitly in some form such as the description on a web site or email announcement that your contribution is under the MIT license. (It doesn''t have to be exclusive; you can release it under difference licenses at the same time.)
  
  Have you contributed source to Squeak? If you believe you have, but have not sent in an agreement to allow your submission(s) to be licensed under the MIT license then please see http://netjam.org/squeak/contributors. There you can find a list of known contributors and a PDF of the agreement with instructions. The snail mail address is found in the agreement PDF file.
  
  Also there are a few people for which we are lacking full contact information. If you think you can help please also visit the link above and see if you can identify any of the unknown developer initials or any of the developers for whom we do not have a current email address.' !

Item was changed:
  ----- Method: SqueakProjectHelp class>>squeakResourcesOnline (in category 'pages') -----
  squeakResourcesOnline
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakProjectHelp edit: #squeakResourcesOnline"
  	^HelpTopic
  		title: 'Squeak Resources Online'
  		icon: (HelpIcons iconNamed: #squeakIcon)
  		contents: 'Squeak web sites
  	Main Squeak site						http://www.squeak.org
  	Weekly Squeak							http://news.squeak.org
  	Oversight Board						http://board.squeak.org
  	Downloads for many versions			http://ftp.squeak.org
  	Development of the virtual machine	http://squeakvm.org
  	Google+ Page
  		https://plus.google.com/u/0/b/115950529692424242526/
  	
  Squeak-dev - The main Squeak mailing list
  	http://lists.squeakfoundation.org/mailman/listinfo/squeak-dev
  	http://dir.gmane.org/gmane.comp.lang.smalltalk.squeak.general
  	http://n4.nabble.com/Squeak-Dev-f45488.html
  
  Squeak-Beginners - The place to ask even the most basic questions
  	http://lists.squeakfoundation.org/mailman/listinfo/beginners
  	http://dir.gmane.org/gmane.comp.lang.smalltalk.squeak.beginners
  	http://n4.nabble.com/Squeak-Beginners-f107673.html
  
  Squeak By Example
  	http://www.squeakbyexample.org/
  
  Squeak, Open Personal Computing and Multimedia
  	http://coweb.cc.gatech.edu/squeakbook/
  	http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/
  
  Squeak, Open Personal Computing for Multimedia
  	http://www.cc.gatech.edu/~mark.guzdial/drafts/
  	http://stephane.ducasse.free.fr/FreeBooks/GuzdialBookDrafts/
  
  More Books about Squeak and Smalltalk
  	http://stephane.ducasse.free.fr/FreeBooks.html
  !!
  ]style[(16 316 41 173 65 181 17 35 46 106 46 112 37 49)bu,,bu,,bu,,bu,,bu,,bu,,bu,!!' readStream nextChunkText!

Item was changed:
+ ----- Method: SqueakReleaseNotes class>>asHelpTopic (in category 'accessing') -----
- ----- Method: SqueakReleaseNotes class>>asHelpTopic (in category 'as yet unclassified') -----
  asHelpTopic
  
  	^ DirectoryBasedHelpTopic new
  		directoryEntry: (FileDirectory default entryAt: 'release-notes' ifAbsent: []);
  		sortBlock: [:t1 :t2 | t1 title >= t2 title];
  		title: self bookName!

Item was changed:
  ----- Method: SqueakToolsDebuggerHelp class>>openingTheDebugger (in category 'pages') -----
  openingTheDebugger
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakToolsDebuggerHelp edit: #openingTheDebugger"
  	^HelpTopic 
  		title: 'Open a Debugger.'
  		contents: 'A debugger window is opened in response to an unhandled exception condition. Evaluating the expression ''self halt'' in a workspace or as an expression in a method will cause a debugger window to be opened. The debugger provides direct interactive access to the interrupted process.
  
  The debugger permits its interrupted process to be inspected and modified. Source code and variables may be modified interactively, and the process can be stepped through its execution in various ways.'!

Item was changed:
  ----- Method: SqueakToolsDebuggerHelp class>>usingTheDebugger (in category 'pages') -----
  usingTheDebugger
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakToolsDebuggerHelp edit: #usingTheDebugger"
  	^HelpTopic 
  		title: 'Debugging Loops.'
  		contents: 'There are a few ways to get out of a loop.  The best way is to just let the loop run.
  
  To do that select the space on your code (while in the Debugger) you want to jump to, right click and select: ''run to here.''
  
  ' asText, 
  (self showForm: #Debugger1),
  '
  
  That will take you to the place you clicked on in your code.
  
  There is another trick, loops usually have an index. This is Smalltalk after all.  In the case above we just selected this code and selected ''Debug it''
  
  1 to: 100 do: [:i | Transcript show: i asString].
  Transcript show: ''done''
  
  While in the outer content evaluating the loop, select i change the value to 100 hit accept and ''bobs your uncle'' the loop is done. 
  
  Ok so a bit of a hack but this can be used it to skip over some processing, and since you are debugging and know what you are doing it should be fine.
  
  ' asText,
  (self showForm: #Debugger2),
  '
  Proceed is just continue and stop debugging.
  
  Restart will stop debugging at the selected method and restart that method from the beginning.
  
  Into goes into the execution of the next method and shows you what it does.
  
  Over executes the next message and moves over it to the next message.
  
  Through steps you through a block of code, so if you are about to execute a block, this steps you through that block
  
  Full Stack increases the number of levels you see in the upper panel.  That normally shows you a subset of the execution stack.  Full stack will show you the rest of the stack that called this method.
  
  Where is useful if you click around a method during debugging. It will highlight the code at its execution point.  You can also just select the stack method again to do the same thing.
  
  Tally is supposed to tally selected code, but may not be reliable within the debugger. If you want to tally something do it outside a debugger.' asText!

Item was changed:
  ----- Method: SqueakToolsDebuggerHelp class>>whatIsADebugger (in category 'pages') -----
  whatIsADebugger
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakToolsDebuggerHelp edit: #whatIsADebugger"
  	^HelpTopic 
  		title: 'What is a Debugger.'
  		contents: 'A debugger represents the machine state at the time of an interrupted process. It also represent a query path into the state of the process.
  
  The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.'!

Item was changed:
  ----- Method: SqueakTutorialsOnImage class>>theImage (in category 'as yet unclassified') -----
  theImage
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakTutorialsOnImage edit: #theImage"
  	^HelpTopic 
  		title: 'Working with the Squeak Image'
  		contents: 'Working with the ecosystem of objects in a Smalltalk image.
  		
  The basic tool for this is called an Inspector. Whenever you have an expression, like "3 + 4", you press cmd-i to "inspect it", which opens an inspector on the result. This works in any text area. Try for example inspecting "self" in a class browser, and you will inspect the underlying class object (which the browser shows a high-level view of).
  
  In the Inspector you see the objects referenced by this object (via instance variables or indexed fields) in the left panel. Select any of them and choose "inspect" from the context menu (or press cmd-i again). This way you can inspect all the objects in the system.
  
  A more modern tool than the Inspector (which was around 40 years ago already) is the Object Explorer. It presents you a tree view of an object and its "children", which again are the instance variables and indexed fields of the object. Open it with cmd-shift-i (or "explore" in the context menu).
  
  You can also do the reverse. If you choose "objects pointing to this value" you get an inspector showing all the objects that directly point to this object. Similarly there is a "reverse explorer", which you can open by selecting "explore pointers".
  
  There are two roots to all the objects in the system:
  
          Smalltalk specialObjectsArray
  
  which basically holds everything the Virtual Machine needs to know about, and in turn almost every object in the whole image, and
  
          thisContext
  
  which is the current execution context, holding onto temporary objects. When a garbage collection is performed, any object not reachable form either of these two roots is removed from memory.
  
  An "interesting" global object to explore is
  
          Project current
  
  which holds your current workspace, in particular
  
          Project current world
  
  , the root of all morphs in the world. And of course
  
          Smalltalk
  
  itself is the dictionary that holds all global objects, including all classes (unless they are defined in a non-global environment).
  
  There is also a low-level way to enumerate all objects in memory. "self someObject" will return the very first object in memory (which happens to be the nil object), and "anObject nextObject" will return the next one:
  
          | object count |
          count := 0.
          object := self someObject.
          [0 == object]
                  whileFalse: [count := count + 1.
                          object := object nextObject].
          count
  
  Interestingly, this also finds objects that are due to be garbage-collected. For example, if you accidentally closed a text window, there is a good chance its contents will still be in memory, and can be retrieved using an expression like
  
          ByteString allInstances last: 10
  
  This makes use of the someInstance/nextInstance methods, which are similar to someObject/nextObject, but restricted to instances of one class only.
  '!

Item was changed:
  ----- Method: SqueakTutorialsOnXML class>>dataRetrieval (in category 'pages') -----
  dataRetrieval
+ 	"This method was automatically generated. Edit it using:"
+ 	"SqueakTutorialsOnXML edit: #dataRetrieval"
  	^HelpTopic 
  		title: 'Retrieving XML data'
  		contents: 
  'Retrieving data from XML documents is simple and easy in Squeak Smalltalk. This tutorial demonstrates the fundamentals with a straightforward approach where code can be tested right away either here or in a Workspace window. The beauty of Squeak Smalltalk resides in the possibility to evaluate, inspect, print and debug code anywhere and this window is no different. 
  
  This tutorial demonstrates how to...
  
  	* retrieve an XML document from the World Wide Web
  	* instantiate an XML document class
  	* inspect and understand the content of an XML document
  	* retrieve and display values from specific XML tags
  
  Retrieve an XML document from the World Wide Web
  
  There are many manners to retrieve data from the World Wide Web in Squeak Smalltalk. HTTPClient is among them and allows to download files in all simplicity. Select the following code snippet and inspect it (press alt-i). An Inspect window will open with the document loaded in memory. The result is a MIMEDocument object.
  
  	HTTPClient httpGetDocument: ''http://source.squeak.org/trunk/feed.rss''.
  
  TIP: Select HTTPClient and browse it (press alt-b) to open a System Browser window on its class. HTTPClient does not have instance methods but it has class methods. Click on class to see class methods.
  
  Instantiate an XML Document
  
  An instance of MIMEDocument will not allow to retrieve XML data in a comprehensive manner because it does not understand the nature of XML. For this reason, it is necessary to parse the content of MIMEDocument using XMLDOMParser. XMLDOMParser>>parseDocumentFrom: requires a stream as a parameter and ReadStream will be used for this purpose. The following code snippet instantiates an XMLDocument using the content of the downloaded file.
  
  	| doc |
  	doc := HTTPClient httpGetDocument: ''http://source.squeak.org/trunk/feed.rss''.
  	XMLDOMParser parseDocumentFrom: (ReadStream on: (doc content)).
  
  Inspect and understand the content of an XML document
  
  XML is a flexible document format and it is necessary to understand how each given XML file is structured in order to properly search, retrieve and manipulate data. Inspecting values is critical in a dynamic programming language and environment, such as Squeak Smalltalk. Select the previous code snippet and inspect it (press alt-i).
  
  Unfortunately, the Inspect window does not reveal a lot about the XML structure of the downloaded file. Select the previous code snippet once again and explore it (press alt and the capital letter i). An Explorer window will open with a tree outline on the instance of XMLDocument.
  
  The Inspect and Explorer windows tell a lot about an XMLDocument. The sections are instance variables and their values are displayed aside. In the Explorer window, unfold elementsAndContents. Unfold other sections as deemed necessary to understand the XML format and the data available.
  
  The gibberish coding is about to become clear. Open a Browser window from the world menu and right click in the first pane, select find class (press alt-f) and type XMLDocument to search for its class, or select the class name and browse it (press alt-b). However, it is suggested to read more about XMLParser and XMLParserTest first. 
  
  Retrieve and display values from specific XML tags
  
  The downloaded XML file contains a list of items which are denoted by the tag name "item". The Explorer window revealed the content of interest is located at the array index 1 of the elementsAndContents, which can be accessed through XMLDocument>>root.
  
  TIP: Some XML documents have additional components contained within its file, such as XMLPI (XML Processing Instructions). For this reason, the root may lead to this rather than the data which will be indexed at 2 or more. It is necessary to use XMLNodeWithElements>>elements, e.g. (xml elements at: 2), in order to access subsequent data.
  
  The following code snippet will display items in a Transcript window. Open a Transcript window using the world menu before selecting and executing the code. Select the code snippet and execute it (press alt-d).
  
  	| doc xml |
  	doc := HTTPClient httpGetDocument: ''http://source.squeak.org/trunk/feed.rss''.
  	xml := XMLDOMParser parseDocumentFrom: (ReadStream on: (doc content)).
  	xml root tagsNamed: #item do: [:e |
  		Transcript show: (e asString); cr.
  		].
  
  An XML item looks like this:
  
  	<item>
  	<title>HelpSystem-Core-tbn.46.mcz</title>
  	<link>http://source.squeak.org/trunk.html</link>
  	<description>throw out pharo specific stuff since we are now integrated in squeak (and pharo too where squeak specific stuff was removed)</description>
  	<pubDate>Sun, 02 May 2010 20:23:49 +0000</pubDate>
  	<author>Torsten Bergmann <Torsten.Bergmann at astares.de></author>
  	<category>The Trunk</category>
  	<enclosure length="27288" type="application/x-monticello" url="http://source.squeak.org/trunk/HelpSystem-Core-tbn.46.mcz"/> 
  	<guid isPermaLink="false"/> </item>
  
  The following code snippet uses information learned, retrieves each comment and displays them in a Transcript window. Notice an author can have a nil value and is handled accordingly.
  
  	| doc xml |
  	doc := HTTPClient httpGetDocument: ''http://source.squeak.org/trunk/feed.rss''.
  	xml := XMLDOMParser parseDocumentFrom: (ReadStream on: (doc content)).
  	xml root tagsNamed: #item do: [:e |
  		Transcript 
  			show: ''Date: '', ((e firstTagNamed: #pubDate) contentString); cr;
  			show: ''Title: '', ((e firstTagNamed: #title) contentString); cr;
  			show: ''Author: '', 
  				(((e firstTagNamed: #author) notNil)
  					ifTrue: [(e firstTagNamed: #author) contentString]
  					ifFalse: ['''']); cr;
  			show: ''Description: '', ((e firstTagNamed: #description) contentString); cr; cr.
  			].
  
  An item will now look like:
  
  	Date: Sun, 02 May 2010 20:23:49 +0000
  	Title: HelpSystem-Core-tbn.46.mcz
  	Author: Torsten Bergmann <Torsten.Bergmann at astares.de>
  	Description: throw out pharo specific stuff since we are now integrated in squeak (and pharo too where squeak specific stuff was removed)
  '!



More information about the Squeak-dev mailing list