Searching the Image for Text

Previous pageNext page

"Browse methods containing the text, 'Dolphin' (may take a few seconds to read several megabytes of source code)."

SmalltalkSystem current browseContainingText: 'Dolphin'.


If you evaluate the above expression you will end up with a new window called a Method Browser that will show a list of all methods whose source code contains the word "Dolphin". You can select each of the methods in turn to see the source and the occurrence of the text you searched for. Just close the Method Browser when you're done.

The point of this experiment is not really to show how fast you can search through Dolphin's 10+ Mb of source code but, rather, to show how facilities that are built into the development tools are also available to you when you are programming. Normally, you would use the Class Browser tool's Method/Browser other/Containing text... menu command to do such a search but it is always possible you might want to extend the Dolphin environment in future with your own tools that make use of this facility.

Remember, to get back to these experiments just choose Help/First Splash in any Dolphin tool window.