2000 GET!! Changed how the Lua factory is registered.

Originally committed to SVN as r2000.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-09 21:36:24 +00:00
parent f8d7c69c15
commit 777242fce3
2 changed files with 7 additions and 4 deletions

View File

@ -255,15 +255,17 @@ namespace Automation4 {
// Factory class for Lua scripts
class LuaScriptFactory : public ScriptFactory {
public:
LuaScriptFactory()
LuaScriptFactory() { }
~LuaScriptFactory() { }
void RegisterFactory ()
{
engine_name = _T("Lua");
filename_pattern = _T("*.lua");
Register(this);
}
~LuaScriptFactory() { }
virtual Script* Produce(const wxString &filename) const
{
// Just check if file extension is .lua

View File

@ -82,7 +82,8 @@ void PluginManager::RegisterBuiltInPlugins() {
// Automation languages
#ifdef WITH_AUTO4_LUA
new Automation4::LuaScriptFactory();
Automation4::LuaScriptFactory *lua = new Automation4::LuaScriptFactory();
lua->RegisterFactory();
#endif
#ifdef WITH_PERL
Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory();