What is the Best Way To Include the Data Grid Library?
When using Data Grids in your application you need to include the revDataGridLibrary.rev stack file in order for the Data Grids to work. This lesson will show you how to do this with the application framework.
The first approach to including the revDataGridLibrary.rev stack is to let the Revolution Standalone Builder do it. While this works fine the one drawback is that you have to rebuild your standalone if the data grid library is updated.
To use this approach follow the instructions in the Data Grid manual, using the glxappLauncher stack since that is the stack used to build a standalone.
The second approach is to manually include the revDataGridLibrary.rev stack. The benefit of this approach is that you can update the data grid library without having to rebuild a standalone. The following steps will show you how.
Locate revDataGridLibrary.rev Stack
Copy File Into Application Folder
Add Stack File As Standalone Resource
Now we need to add the revDataGridLibrary.rev stack file as a standalone resource. A stack that is a standalone resource is not loaded by the framework which is what we want in this case. The Data Grid stack is always loaded by the IDE during development so we only need to load it when running as a standalone.
Open the IDE plugin and switch to the Standalone Resources tab. Click the Add File button.
Set Output Folder
Load revDataGridLibrary.rev Stack
The last step is to load the stack file when running the application as a standalone. The Data Grid stack file MUST be available when stacks that use Data Grids are loaded. Otherwise the Data Grids will not work. You can load the revDataGridLibrary.rev stack file into memory in the glxapp_preloadApplication handler in the application stack script. This message is sent before any of your application stacks are loaded into memory.
Copy & Paste
if the environment is not "development" then
put there is a stack (glxapp_getProp("executable folder") & \
"/components/revdatagridlibrary.rev") into theStackExists