How To…Create RAP Globals in Code

Question

“How do I create a RAP Global Variable and assign it in the RAP OnGlobalCreate event in Delph code?”

Solution

Use the raGetCodeModule() routine to access the RAP code module in code and manually add a TraVarProgram and TraProgram object to create the variable and OnGlobalCreate event.

Download: CreateGlobalVar.zip

Download: CreateGlobalProc.zip

Sample Delphi code: