10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How Procedure Handles Work (ProcHandle Objects)stringscopeSpecifies a literal string or a string variable that specifies the name of aprocedure.Specifies where the procedure:• Is visible• Is to be executedGenerally, the scope of a ProcHandle object is CurScriptScope (the context ofthe currently executing field script) or CurFrame.Scope. To create aProcHandle object for a global procedure named identically to a localprocedure, use a global scope to represent the current application(CurSession.Scope).If the currently executing frame or procedure is part of an included application,CurSession.Scope represents the global scope for that included application aswell as the global scopes for all applications directly included by thatapplication.The names of included applications can be specified explicitly. For example, thefollowing code fragment gets the procedure handle for a procedure namedprocname defined for an application named appname. The procedure handle isput into a variable named handle:handle = CurSession.Scope.GetProcHandle(Name = 'appname!procname');Note: appname must reference an application directly included by thecurrently active application.How You Can Execute a ProcHandle ObjectTo execute the procedure specified by the ProcHandle object, invoke the Callmethod defined for the ProcHandle class. The syntax is:[retval =] prochandle.Call(parameters);The parameters are specified just as in a callproc statement. For anexplanation about using the callproc statement, see How You Can PassParameters to 4GL Procedures (see page 84).The Call method uses the scope specified by the ProcHandle object to executeit.88 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!