Controlling STATISTICA Events with SVB Programs

An event is an action that is typically performed by a user, such as clicking a mouse button, pressing a key, changing data, or opening a spreadsheet or workbook. In STATISTICA certain events are displayed and can be used to customize its behavior. Using programmable events, you can tailor STATISTICA's behavior to your needs. Examples of events applications might include:

  • building auditing systems into STATISTICA (by IT departments),

  • building interactive demonstration programs based on workbooks,

  • building customized user interfaces adhering to specific requirements of a particular application (or a specific company - e.g., to meet specific security requirements),

  • preventing another user from saving changes made to a file,

  • making specific sections of a spreadsheet dependent solely on other (i.e., automatically recalculated) values and protecting them from being changed directly,

  • creating a backup file of a particular workbook to a specific location whenever you save that workbook (so you won't have to save it twice).

Events are an important part of the set of tools built into STATISTICA to make it a powerful solution building system.

Types of events. There are three different types of events: document-level events, application-level events, and analysis-level events.

Document-level events. These events occur for open documents and in some cases, for objects within them. For example, the workbook document object can respond to the open, new, and print events and the spreadsheet document object can respond to events such as changed data values, double-clicks on a cell, etc. See below for a complete listing of all document-level events. See also Document-Level Events Example for further details.

Application-level events. These events occur at the level of the application itself, for example, when a new spreadsheet, report, graphs, or workbook is created. You can create an event handler customizing these actions for all documents of that type. See below for a complete listing of all application-level events. See also Application-Level Events Example for further details.

Analysis-level events. These events occur at the level of an analysis itself, for example, when an analysis is about to produce output. You can create an event handler customizing these actions for all analyses. See below for a complete listing of all analysis-level events. See also Analysis-Level Events Example for further details.

Supported events. You can review the list of available events that can be customized by reviewing the contents of the Proc box in the Document Events dialog box.

Supported document-level events. STATISTICA supports event handlers for all objects, i.e., spreadsheets, graphs, workbooks, and reports (as demonstrated in the Document-Level Events Example). Specifically, the following document-level events are supported:

Spreadsheet. Activate, BeforeClose,BeforeDoubleClick, BeforePrint, BeforeRightClick, BeforeSave, DataChanged, Deactivate, OnClose, Open, SelectionChange, StructureChanged. See Spreadsheet Document-Level Events for a detailed description of each event.

Graph. Activate, BeforeClose, BeforeDoubleClick, BeforePrint, BeforeRightClick, BeforeSave, Deactivate, OnClose, Open. See Graph Document-Level Events for a detailed description of each event.

Workbook. Activate, BeforeClose, ClickBeforePrint, BeforeRightClick, BeforeSave, Deactivate, OnClose, Open, SelectionChanged. See Workbook Document-Level Events for a detailed description of each event.

Report. Activate, BeforeClose, BeforePrint, BeforeRightClick, BeforeSave, Deactivate, OnClose, Open, SelectionChanged. See Report Document-Level Events for a detailed description of each event.

Supported application-level events. STATISTICA supports event handlers for the application (as demonstrated in the Application-Level Events Example). Specifically, the following application-level events are supported:

OnClose, OnInit, SpreadsheetActivate, SpreadsheetBeforeClose, SpreadsheetBeforeDoubleClick, SpreadsheetBeforePrint, SpreadsheetBeforeRight, SpreadsheetBeforeSave, SpreadsheetDataChanged, SpreadsheetDeactivate, SpreadsheetNew, SpreadsheetOnClose, SpreadsheetOpen, SpreadsheetSelectionChange, SpreadsheetStructureChanged, WorkbookActivate, WorkbookBeforeClose, WorkbookBeforePrint, WorkbookBeforeRightClick, WorkbookBeforeSave, WorkbookDeactivate, WorkbookNew, WorkbookOnClose, WorkbookOpen, WorkbookSelectionChanged. See Application-Level Events for a detailed description of each event.

Supported analysis-level events. STATISTICA supports event handlers for analyses. Specifically, the following analysis-level events are supported:

Activate, BeforeClose, BeforeOutput, Deactivate, OnClose. See Analysis-Level Events for a detailed description of each event.

Practically all events related to the opening, printing, saving, closing, or editing of documents or applications can be "intercepted" by custom event handlers. Since the entire functionally of the STATISTICA Visual Basic programming environment can be used to customize these event handlers, it is easy to see how completely customized versions of the STATISTICA application can be produced that will alter the "basic behavior" of various options and user actions, and thus optimize the program for particular routine tasks, particular operators with limited access permissions, etc.