Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Browse on all examples
Last updated at 11:48 am UTC on 8 December 2021
This code brings up a browser that shows most examples of all classes. (Some examples are not in the examples category). Type in the following and evaluate it ("Do it" from the menu)...

 SystemNavigation new browseAllMethodsInCategory: #examples

SqueakBrowseExamples.PNG

Note: Checked with Version 3.10.2; Sept. 2008: OK

Question: Could you explain what to do with these examples? How can I execute them?

Answer: Here's one way:

"Do it" on the above command which, again, is:

 SystemNavigation new browseAllMethodsInCategory: #examples

A window titled "examples" comes up, showing a number of methods (correct term?). If you click on, say:

 AbstractSound class chromaticRunFrom:to:on: {examples]

you'll see the method, in the lower pane, which begins:

chromaticRunFrom: startPitch to: endPitch on: aSound

"Answer a composite sound consisting of a rapid chromatic run between the given pitches on the given sound."
"(AbstractSound chromaticRunFrom: 'c3' to: 'c#5' on: FMSound oboe1) play"


The "example" is the last line, which begins:

"(AbstractSound chromaticRunFrom:...

Select everything within the quotes in that line but not the quotes themselves (Double-clicking just inside the left quote or the right quote will also select the entire contents of the quote). Now "Do it" (Alt-d for Windows) and you'll hear the chromatic run being played.

Now mess all you want with the method and play the example line again; or change the example line. When you click away don't save your changes, to leave everything as it was when you entered.