I'm writing a plugin whose design kinda evolved after noticing LoadPlugin()
The thing I'm noticing is that all the other Plugin functions want a PluginID, and GetPluginID accepts no parameters returning only the current plugin's ID. Is there an easy, direct way to get this for another plugin?
For Example:
PluginA calls LoadPlugin("C:\foo.xml")
How can PluginA get foo.xml's pluginID?
I've thought of the addxml module and parsing the file to get the id entity, or since PluginA uses SQLite, having a temp table that's GetPluginList() before calling LoadPlugin, and GetPluginList() a second time, and using SELECT * from b where id not in(select * from a)... (or a couple of for loops to invert key/value for the first, and if not knownPlugins[k] then heresMyNewId = k ; break )
Am I over thinking the problem? Is there an easy way to get another plugin's id from a file path?
The thing I'm noticing is that all the other Plugin functions want a PluginID, and GetPluginID accepts no parameters returning only the current plugin's ID. Is there an easy, direct way to get this for another plugin?
For Example:
PluginA calls LoadPlugin("C:\foo.xml")
How can PluginA get foo.xml's pluginID?
I've thought of the addxml module and parsing the file to get the id entity, or since PluginA uses SQLite, having a temp table that's GetPluginList() before calling LoadPlugin, and GetPluginList() a second time, and using SELECT * from b where id not in(select * from a)... (or a couple of for loops to invert key/value for the first, and if not knownPlugins[k] then heresMyNewId = k ; break )
Am I over thinking the problem? Is there an easy way to get another plugin's id from a file path?