The Trunk: Help-Squeak-Project-tpr.54.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Help-Squeak-Project-tpr.54.mcz

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

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

Name: Help-Squeak-Project-tpr.54
Author: tpr
Time: 24 June 2018, 6:45:17.430564 pm
UUID: ba33b657-b321-43ae-8485-f38afd39a3b5
Ancestors: Help-Squeak-Project-cmm.53

Start process of moving responsibilty for deciding on Help content code styling or not from TheWorldMainDock to the actual content.
The overall effect of these groups of changes is to make no visual difference. Yet.

=============== Diff against Help-Squeak-Project-cmm.53 ===============

Item was changed:
  ----- Method: SqueakTutorials class>>usefulExpressions (in category 'pages') -----
  usefulExpressions
 
+ ^ CodeStyledHelpTopic
- ^ HelpTopic
  title: 'Useful Expressions'
  readOnlyContents: Utilities standardWorkspaceContents!

Item was added:
+ ----- Method: SqueakTutorials class>>usesCodeStyling (in category 'testing') -----
+ usesCodeStyling
+ "I want the help browser to use code based styling on my content"
+ ^true!

Item was added:
+ ----- Method: SqueakTutorialsCommandKey class>>usesCodeStyling (in category 'testing') -----
+ usesCodeStyling
+ "I don't want the help browser to use code based styling on my content - I show a simep llist of key mappings which really don't need it"
+ ^false!

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
- ^HelpTopic
  title: 'Working with the Squeak Image'
+ contents:
+ 'Working with the ecosystem of objects in a Smalltalk 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.
+ !!
+ ]style[(59 2838)bi,!!' readStream nextChunkText)
+ key: #theImage!
- '!