You can use the GRT shell to help understand the
catalog_utils.grt.lua
module. Open the GRT
shell by pressing Ctrl F3 or
by selecting the GRT Shell menu option
found under the View,
Advanced menu options.
Notice that the getPluginInfo
function makes
use of the grtV
module by invoking its
getObj
function. The grtV
module is a built-in Lua module that assists with working from
the GRT shell. To find out more about the
grtV module, type ? grtV
in the GRT shell console window. You should see something
similar to the following:
GRT Value Management Library - grtV ----------------------------------- A library that contains functions to work with GRT values. clearList child fromXml getContentType getKey getListItemByObjName getn getGlobal insert load newDict newList newObj remove save setGlobal toLua toXml typeOf
Typing help grtV.<command>
displays
help on a specific command. For example, entering
help grtV.newObj
displays the following
output.
GRT Value Management Library - grtV.newObj ------------------------------------------ Creates a new GRT object initialized with the optional given values. All simple values ("int", "string", "real") are initialized and all lists and dicts are created. Object references are left null. grtV.newObj (structName[, initValuesDict]) Parameters: structName Struct name of the object to create initValuesDict A dictionary containing initial values for object fields. Examples: rdbmsMgmt= grtV.newObj("db.mgmt.Management", {name="rdbmsManagement", owner=app}) Create a new object from the struct "db.mgmt.Management"
The grtV.newObj
function is used by both the
objectPluginInput
and the
getPluginInfo
functions of the
catalog_utils.grt.lua
module. A
structName
is the first parameter for the
grtV.newObj
function. In the case of the
objectPluginInput
function in
catalog_utils.grt.lua
module, the
structName
is
app.PluginObjectInput
. To find out more about
this struct, locate it in the Structs
window.