Visualization Tools User's Guide


Example: Searching

Suppose that you want to find and mark all the buttons in the Transcript which have no accelerator key.

  1. Open a Snooper on the Transcript window.
  2. Press the Search button.
  3. As the Search for: criterion, type
    [:x |
     (x respondsTo: #accelerator) and: 
         [x accelerator isNil]
    ]
    

    (Note: the (x respondsTo: #accelerator) is not strictly necessary but may result in a more efficient search.)
    Spy Search window

  4. On the Options tab, select Mark Found Items with and select a symbol from the pulldown.
  5. Press Search!

    The Snooper display contracts to only the self line. This is because there are no such objects to depth 2 in the Transcript window. We will try again, increasing the depth.

  6. Press Search.
  7. In the (Spy Search) pane, press Prev once, and then Copy.
  8. Set the Search Depth to 4.
  9. Press Search, and wait somewhat longer than before.

    The Snooper shows up with certain values (those push buttons with no accelerator) selected. They are also marked with the symbol you selected. (If you later change the selection, the marks will remain.)
    Spy Search Results window

  10. Select the first line found, and press control+r (or, from the Hide menu select Reveal and Expand Selected) and confirm that indeed that button's accelerator is nil.


[ Top of Page | Previous Page | Next Page | Table of Contents ]