Procedures

Panorama organizes programming code into procedures. Each procedure contains the code for performing a particular task. (See Code to learn about writing the code itself.)

Panorama has both named and anonymous procedures.

#### Named Procedures

A named procedure is a self contained entity. It can be included in menus, and called as a subroutine from other procedures. Named procedures are accessed from the View Menu.

To learn how to create a named procedure, see View Menu. To learn about the tools available for editing a named procedure see Procedure Editor. To learn how named procedures can be used in the Action menu see Action Menu.

#### Anonymous Procedures

An anonymous procedure is embedded in another entity – either a database field, a form, a form object, or other program code. These procedures cannot be accessed or used independently from the entity they are embedded into.

This example shows an anonymous procedure embedded into the Lot field of this database.

When a value in the field is edited, the procedure code is triggered. If the building size is larger than the lot, the code will display an alert message.

As shown in the illustration above, anonymous procedures are set up in an inspector panel on the right edge of a window. This is great for short bits of code, but for more complex code you may want to put some or all of the code in a named procedure. This allows you to take advantage of the more powerful editing and debugging tools available for named procedures (see Procedure Editor). To do this, simply use the call statement, which allows you to call any named procedure as a subroutine.

In the example above there is no code in the anonymous procedure except for the `call` statement, but you can include a mix of both regular code and calls to named procedures.

See Also

- Accessing the Clipboard -- reading from and writing to the system's clipboard.
- Action Menu -- simple way to create your own menu items.
- Alerts -- displaying a variety of standard modal alerts.
- Automatic Field Code -- running a short program when data is entered into a field.
- Channels -- provide a standard way to interface with external resources (email servers, phones, web sites etc.)
- Code -- basics of programming code.
- Coding with Debug Instrumentation -- modifying your code to generate debug instrumentation output.
- Control Flow -- making decisions about what code should be executed in response to changing conditions.
- copyindentedcode -- copies the selected code with 4 space indent (for pasting into the Panorama forum).
- Crash Proof Debug Instrumentation Monitoring -- real time crash-proof instrumentation monitoring
- Custom Dialogs -- creating custom dialogs using forms.
- Custom Menus -- creating custom menus, menu bars and pop-up menus (and customizing standard menus).
- Custom Statements -- creating your own custom statements that can be used in your code.
- Customizing Debug Instrumentation Coverage -- specifying what code is being debugged at the moment.
- Database Navigation & Editing -- using program code to navigate within a database, and to add and remove database records.
- Debug Instrumentation -- conditional logging of the internal state of Panorama program code.
- Debug Instrumentation Log Window -- dynamically monitor debug instrumentation output as your program runs.
- Debug Instrumentation Monitoring using an External Program -- monitoring debug instrumentation with an external program (Terminal.app, BBEdit.app).
- Debug Instrumentation Text File -- configuring and accessing the debug instrumentation log (text) file.
- Drag and Drop -- dragging data to and from a Panorama form.
- Generating & Analyzing HTML -- generating HTML code from data, and extracting data from structured HTML.
- Internet Access -- accessing information from web servers.
- Procedure Editor -- editing named procedures.
- Procedure Recorder -- recording database actions as code.
- Program Access to Databases -- using a program to create, open, import or export databases.
- Program Error Handling -- handling errors and exceptions that occur when a program is running.
- Programmable Database Administration -- using a program to access and/or modify the structure of a database.
- Programmable Form Management -- using a program to work with forms.
- Programmable Graphics -- using program code to create and modify graphic objects in a form.
- Programmable Outlines -- using a program to create and manipulate data outlines.
- Programmable Printing -- using program code to print reports, mailing labels, etc.
- Programmable Searching -- using program code to search and select data.
- Programmable Sorting -- using program code to sort a database.
- Programmable Text Export -- using a program to export text from a database.
- Programmable Window Management -- using a program to arrange windows.
- Programming Database Fields -- using a program to add and remove database fields.
- Recompiling Code -- recompiling code & formulas
- Recording Code Triggers in Debug Instrumentation -- the code triggers option automatically tracks whenever any code is triggered, whether from a menu, a button, or implicitly (for example when data is entered).
- Recording Control Flow in Debug Instrumentation -- configure debug instrumentation to automatically log when control flow is non-linear, for example a call, return, goto, etc.
- Scripting -- embedding scripting languages (AppleScript, shell scripts, Python, Ruby, PHP, Perl, etc.) into Panorama program code.
- Speech Programming -- using program code to convert data to speech (voice).
- Statements -- index of all statements available for use in Panorama procedures.
- Subroutines -- writing code that can be called from other code.
- Suppressing Display -- temporarily disabling display of changes in a program (to reduce "flickering" and increase performance).
- Timer Workshop -- provides a tool for monitoring timers and testing timer configurations.
- Timers -- executing recurring periodic background code at fixed intervals.
- Transforming Data -- using program code to modify data in bulk.
- Triggers -- finding out what event triggered the execution of program code.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, now allows anonymous procedures.