Method Spies

 

 | tools+ | restore | home |


What are Method Spies?

Inserting a Spy

Editing a Spy

Spy Examples

 

  Editing a Method Spy

To edit a Method Spy, place the text cursor within the highlighted region of the spy and select ‘Inspect Spy’ from the Method Spies submenu of the context menu - or simply press control-I. The spy is shown in a special inspector:

In the Spy Inspector, you can view/edit the source code of the spy, with full coloured syntax highlighting, plus:

save changes to the source code of the spy
enable/disable the spy
reset the spy – empties the context and activationContexts
remove the spy – the spy will be deleted from the method, and the inspector will close

The Spy Inspector also allows you to examine the context and activationContexts Dictionaries, if your spy code is using these.

Note that if a spy is inserted via the context menu (rather than an F9 keypress), you will be taken straight into the spy inspector. This is useful for inserting a spy with more complex code than can be easily entered via a simple prompter.

 

Removing a Method Spy

To remove a method spy, place the text cursor within the highlighted spy area and press Shift-F9. Alternatively, a spy can be removed using the context menu, or a spy inspector as described above.

To remove all spies from a method, press Ctrl-F9 or use the context menu in the method list.

 

© 2002 Solutions Software Ltd.