links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FAQ: Finding Code in an Image
Last updated at 3:08 am UTC on 12 May 2018
How do I find the code that does X in Squeak? For example, how do I find the code that handles the "save and quit" menu item?

On the menus there are a couple of possibilities. Let's, for example, try to find out how the "help..." item in the World menu works:

Regarding the windows present in the Squeak distributed image, some (the Play with me's) are projects. Click in one of these windows and pick "enter" from the menu that appears. Once in the project, all morphs can be manipulated (inspected, moved, trashed, etc) by cmd-clicking on the morph and clicking on the appropriate halo. The other windows are simple workspaces with text typed in them. BobArning

A really fun way to do this is to interrogate the menu itself, which is easy in Morphic.
  1. Show the menu (can help to pin it down first),
  2. Blue button click on the save-and-quit menu item. This brings a halo on the menu.
  3. Blue button click again on the save-and-quit menu item. Now the halo is on the menu item itself.
  4. Red button click the red menu halo to show the menu.
  5. Choose debug and then explore morph.
  6. Expand the root:morph and look at the possibilities. In particular there is one called selector that says #doMenuItem:with:. That selector isn't the one we want here, but it's second argument (left click the triangle to expand the arguments) is #saveAndQuit. David Mitchell