Enhancing context of objects and forms
You can call variables, procedures and functions of objects and forms located in external modules as properties and methods of these objects and forms. You can call variables, procedures and functions that are declared with Exportkeyword. You can also call form attributes (for forms).
Example:
// Example of using procedure of printing documents from a journal
// of documents. Let's assume that we have several different documents,
// each of which has Print() procedure. The document journal module
// contains Print button that calls printing procedure
// for the current document of the journal.
Procedure PrintClick(Item)
// We get the current document, where the cursor is positioned.
CurDoc = Controls.LogList.CurrentRow;
// We get the main form of the current document.
FormCurDoc = CurDoc.GetForm();
// Let's call printing procedure located in
// the module of document form.
FormCurDoc.Print();
EndProcedure