PDA

View Full Version : getModuleInfo question



Bidmaron
March 26th, 2014, 03:30
getModuleInfo returns a field in the table called replaces. What does this mean?




function getModuleInfo( name )
This function can be used to retrieve information about a particular module. The returned table contains information in the following fields:

name
category
author
size
installed (on local machine)
loaded
loading (from host machine)
loadpending (active request to host machine)
permission (none, disallow, allow, autoload)
intact (host only)
replaces (which other modules does this one override)
hastokens
hasdata
Parameters

name (string)
The name of the module being targeted by the operation
Return values

(table)
A table containing information about the module, see above for details

Trenloe
March 26th, 2014, 03:50
https://www.fantasygrounds.com/refdoc/replaces.xcp

Bidmaron
March 26th, 2014, 03:56
Search ninja strikes again!

Trenloe, this is basically expansion capability right? I can find no code in CoreRPG or 3.5E that references this field of getModuleInfo by which to implement any kind of replacement mechanism, right?

Trenloe
March 26th, 2014, 04:29
I would imagine that the FG executable makes use of the <replaces> tag when modules are opened and the module DB is read.

The availability of <replaces> in Module.getModuleInfo is probably more for information purposes. I haven't tested with module DB reading code to see if this is the actual case.

Bidmaron
March 26th, 2014, 04:35
That's what I'm guessing. That is too powerful a feature if it were really implemented for someone like you not to know about what it does and how it works. Thanks again, Trenloe.