When the Code Triggers option is enabled, Panorama will automatically add a log entry every time code is triggered. Sometimes you’ll be trying to track down an error and you’re not even sure what procedure is being triggered – the Code Triggers feature will quickly show you.
If you are using the Instrumentation Log window, enabling this feature is as simple as clicking on the Code Triggers checkbox in the upper right corner.
Whenever the Code Triggers option is turned on, Panorama will automatically add an entry to the Instrumentation Log every time a procedure is triggered, whether explicitly or implicitly. Whenever a menu is chosen, a button is pressed, or implicit code is triggered, the exact trigger will be noted for later examination. This is especially useful for implicit code since you may not be aware that the code is even being triggered (see Implicitly Triggered Procedures).
To illustrate how this works, I’ll use the Help>Font Awesome Icons window that is built into Panorama. This window uses Panorama code, and we can use the Code Triggers feature to see what code is triggered as we perform operations with this window. For example, suppose you click on the button that opens a new window:
If the Code Triggers option is enabled, clicking this button will cause two new lines will appear in the instrumentation log:
The first line records that you clicked on a Text Display Object, and that this object had code associated with it which was run. The log even includes the code itself (if the database is locked down then the code will be redacted). This is an explicit trigger.
The button code opens a new cloned Catalog form. The Catalog form has been set up to implicitly trigger code when it opens. This implicit code trigger has been recorded on the second line of the log (RUN FORM EVENT). If there was a problem in opening the window, the log shows that Panorama got as far as the OPEN FORM EVENT code, so that might be a good place to start looking for the problem.
As this example shows, since the instrumentation log not only shows code in your own databases that are triggered, but code that is built in to Panorama itself (code supplied by ProVUE), it can be educational to enable the CodeTriggers option and then start clicking on things in Panorama to see what is being triggered. (Note: Some code built into Panorama is protected and will not be recorded.) Of course it will be even more common to trigger actions in your own databases to assist with your debugging.
If you are not using the Instrumentation Log window (see [Debug Instrumentation Monitoring using an External Program]), you can still enable the Code Triggers feature using the Instrumentation panel of the Preferences window. First click on Objective-C Classes at the bottom of the list on the left, then click on CodeTriggers on the right.
To turn the feature off again, click on CodeTriggers again.
See Also
History
Version | Status | Notes |
10.2 | New | New in this version. |