=== Top of the Swiki === Attachments ===
FAQ: Finding Code in an Image
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:
- Open a selector finder and in the top pane type help world or menu. Hit return and in the pane below will be a list of symbols continaing that string. Any one of these would contain something of interest: buildWorldMenu or helpDo, in this case. Note that most menus are dynamically constructed when needed, so all you need to do is modify the method that builds the menu and save the image to make the change permanent.
- An alternative approach is to search for the text contained in the menu. Type help... in a workspace, select it and press cmd-shift-e. Up pops a browser listing the three methods that reference a string containing the characters typed. Again, change the appropriate method and you're in business.
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 (colored dots). The other windows are simple workspaces with text typed in them. BobArning