Index: trunk/src/lib/util/executor/executor.h
===================================================================
--- trunk/src/lib/util/executor/executor.h	(revision 8148)
+++ trunk/src/lib/util/executor/executor.h	(revision 8271)
@@ -53,5 +53,5 @@
     // EXECUTE
     /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const = 0;
+    virtual void operator()(BaseObject* object, int& count, void* values) const = 0;
     /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
     virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
Index: trunk/src/lib/util/executor/executor_functional.h
===================================================================
--- trunk/src/lib/util/executor/executor_functional.h	(revision 8148)
+++ trunk/src/lib/util/executor/executor_functional.h	(revision 8271)
@@ -123,5 +123,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)();
@@ -163,5 +163,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -227,5 +227,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -282,5 +282,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -340,5 +340,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -400,5 +400,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
Index: trunk/src/lib/util/executor/executor_lua.cc
===================================================================
--- trunk/src/lib/util/executor/executor_lua.cc	(revision 8148)
+++ trunk/src/lib/util/executor/executor_lua.cc	(revision 8271)
@@ -18,17 +18,19 @@
 #include "executor_lua.h"
 
-template<> bool fromLua<bool>(lua_state* state, int index) { return lua_toboolean(state, index); };
-template<> int fromLua<int>(lua_state* state, int index) { return (int)lua_toumber(state, index); };
-template<> unsigned int fromLua<unsigned int>(lua_state* state, int index) { return (unsigned int)lua_tonumber(state, index); };
-template<> float fromLua<float>(lua_state* state, int index) { return (float)lua_tonumber(state, index); };
-template<> char fromLua<char>(lua_state* state, int index) { reutnr (char)lua_tonumber(state, index); };
-template<> const std::string& fromLua<const std::string&>(lua_state* state, int index) { return lua_tostring(state, index); };
+std::string temp;
+
+template<> bool fromLua<bool>(lua_State* state, int index) { return lua_toboolean(state, index); };
+template<> int fromLua<int>(lua_State* state, int index) { return (int)lua_tonumber(state, index); };
+template<> unsigned int fromLua<unsigned int>(lua_State* state, int index) { return (unsigned int)lua_tonumber(state, index); };
+template<> float fromLua<float>(lua_State* state, int index) { return (float)lua_tonumber(state, index); };
+template<> char fromLua<char>(lua_State* state, int index) { return (char)lua_tonumber(state, index); };
+template<> const std::string& fromLua<const std::string&>(lua_State* state, int index) { temp = lua_tostring(state, index); return temp; };
 
 
 
-template<> void toLua<bool>(lua_state* state, bool value) { lua_pushboolean(state, (int) value); };
-template<> void toLua<int>(lua_state* state, int value)  { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<unsigned int>(lua_state* state, unsigned int value){ lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<float>(lua_state* state, float value) { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<char>(lua_state* state, char value) { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<const std::string&>(lua_state* state, const std::string& value) {lua_pushstring (state, value.c_str()); }
+template<> void toLua<bool>(lua_State* state, bool value) { lua_pushboolean(state, (int) value); };
+template<> void toLua<int>(lua_State* state, int value)  { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<unsigned int>(lua_State* state, unsigned int value){ lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<float>(lua_State* state, float value) { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<char>(lua_State* state, char value) { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<const std::string&>(lua_State* state, const std::string& value) {lua_pushstring (state, value.c_str()); }
Index: trunk/src/lib/util/executor/executor_lua.h
===================================================================
--- trunk/src/lib/util/executor/executor_lua.h	(revision 8148)
+++ trunk/src/lib/util/executor/executor_lua.h	(revision 8271)
@@ -4,38 +4,41 @@
  */
 
-#ifndef _EXECUTOR_SPECIALS_H
-#define _EXECUTOR_SPECIALS_H
+#ifndef _EXECUTOR_LUA_H
+#define _EXECUTOR_LUA_H
 
 #include "executor.h"
 #include "compiler.h"
-
+#include "debug.h"
 #include "luaincl.h"
 
 
 
-template<typename type> type fromLua(lua_state* state, int index) { PRINTF(1)("NOT IMPLEMENTED\n"); };
-template<> bool fromLua<bool>(lua_state* state, int index);
-template<> int fromLua<int>(lua_state* state, int index);
-template<> unsigned int fromLua<unsigned int>(lua_state* state, int index);
-template<> float fromLua<float>(lua_state* state, int index);
-template<> char fromLua<char>(lua_state* state, int index);
-template<> const std::string& fromLua<const std::string&>(lua_state* state, int index);
-
-
-template<typename type> void toLua(lua_state* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };
-template<> void toLua<bool>(lua_state* state, bool value);
-template<> void toLua<int>(lua_state* state, int value);
-template<> void toLua<unsigned int>(lua_state* state, unsigned int value);
-template<> void toLua<float>(lua_state* state, float value);
-template<> void toLua<char>(lua_state* state, char value);
-template<> void toLua<const std::string&>(lua_state* state, const std::string& value);
+template<typename type> type fromLua(lua_State* state, int index) { PRINTF(1)("NOT IMPLEMENTED\n"); };
+template<> bool fromLua<bool>(lua_State* state, int index);
+template<> int fromLua<int>(lua_State* state, int index);
+template<> unsigned int fromLua<unsigned int>(lua_State* state, int index);
+template<> float fromLua<float>(lua_State* state, int index);
+template<> char fromLua<char>(lua_State* state, int index);
+template<> const std::string& fromLua<const std::string&>(lua_State* state, int index);
+
+
+template<typename type> void toLua(lua_State* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };
+template<> void toLua<bool>(lua_State* state, bool value);
+template<> void toLua<int>(lua_State* state, int value);
+template<> void toLua<unsigned int>(lua_State* state, unsigned int value);
+template<> void toLua<float>(lua_State* state, float value);
+template<> void toLua<char>(lua_State* state, char value);
+template<> void toLua<const std::string&>(lua_State* state, const std::string& value);
 
 // FORWARD DECLARATION
 
+///////////////////////
+///// WITHOUT RET /////
+///////////////////////
 
 ///////////
 //// 0 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
+//! Executes a Function with a lua_State* parameter.
 template<class T> class ExecutorLua0 : public Executor
 {
@@ -62,7 +65,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+    virtual void operator()(BaseObject* object, int& count, void* values) const
     {
       (dynamic_cast<T*>(object)->*(functionPointer))();
+      count = 0;
     }
 
@@ -72,6 +76,8 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
-    }
+      return new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
+    }
+  private:
+    void          (T::*functionPointer)();
 };
 
@@ -81,5 +87,5 @@
 //// 1 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
+//! Executes a Function with a lua_State* parameter.
 template<class T, typename type0> class ExecutorLua1 : public Executor
 {
@@ -89,5 +95,5 @@
      * @param function a Function to call
      */
-    ExecutorLua0(void(T::*function)(type0))
+    ExecutorLua1(void(T::*function)(type0))
         : Executor(ExecutorParamType<type0>())
     {
@@ -106,7 +112,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
-    {
-      lua_state* state = (lua_state*)values;
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
 
       (dynamic_cast<T*>(object)->*(functionPointer))(fromLua<type0>(state, 1));
@@ -118,6 +125,8 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
-    }
+      return new ExecutorLua1<T, type0>((this->functionPointer));
+    }
+  private:
+    void          (T::*functionPointer)(type0);
 };
 
@@ -127,13 +136,13 @@
 //// 2 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
-template<class T, typename type0, typename type1> class ExecutorLua1 : public Executor
-{
-  public:
-    /**
-     * @brief Constructor of a ExecutorXML
-     * @param function a Function to call
-     */
-    ExecutorLua0(void(T::*function)(type0, type1))
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename type0, typename type1> class ExecutorLua2 : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua2(void(T::*function)(type0, type1))
         : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
     {
@@ -152,7 +161,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
-    {
-      lua_state* state = (lua_state*)values;
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
 
       (dynamic_cast<T*>(object)->*(functionPointer))(
@@ -166,9 +176,172 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
-    }
-};
-
-
-
-#endif /* _EXECUTOR_SPECIALS_H */
+      return new ExecutorLua2<T, type0, type1>(this->functionPointer);
+    }
+  private:
+    void          (T::*functionPointer)(type0, type1);
+};
+
+
+
+
+
+
+
+////////////////////
+///// WITH RET /////
+////////////////////
+
+
+///////////
+//// 0 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret> class ExecutorLua0ret : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua0ret(ret (T::*function)())
+        : Executor()
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))());
+    }
+
+    /**
+                       * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua0ret<T, ret>(this->functionPointer);
+    }
+  private:
+    ret           (T::*functionPointer)();
+};
+
+
+
+///////////
+//// 1 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0> class ExecutorLua1ret : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua1ret(ret (T::*function)(type0))
+        : Executor(ExecutorParamType<type0>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                   fromLua<type0>(state, 1)));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua1ret<T, ret, type0>(this->functionPointer);
+    }
+  private:
+    ret           (T::*functionPointer)(type0);
+};
+
+///////////
+//// 2 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1> class ExecutorLua2ret : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua2ret(ret (T::*function)(type0, type1))
+        : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                   fromLua<type0>(state, 1),
+                   fromLua<type1>(state, 2) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua2ret<T, ret, type0, type1>(this->functionPointer);
+    }
+  private:
+    ret           (T::*functionPointer)(type0, type1);
+};
+
+
+
+
+
+
+
+#endif /* _EXECUTOR_LUA_H */
Index: trunk/src/lib/util/executor/executor_xml.h
===================================================================
--- trunk/src/lib/util/executor/executor_xml.h	(revision 8148)
+++ trunk/src/lib/util/executor/executor_xml.h	(revision 8271)
@@ -1,9 +1,9 @@
 /*!
- * @file executor.h
+ * @file executor_xml.h
  * Definition of a on-screen-shell
  */
 
-#ifndef _EXECUTOR_SPECIALS_H
-#define _EXECUTOR_SPECIALS_H
+#ifndef _EXECUTOR_XML_H
+#define _EXECUTOR_XML_H
 
 #include "executor.h"
@@ -65,5 +65,5 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+    virtual void operator()(BaseObject* object, int& count, void* values) const
     {
       PRINTF(1)("missuse of XML-operator, OR IMPLEMENT.\n");
@@ -82,3 +82,3 @@
 };
 
-#endif /* _EXECUTOR_SPECIALS_H */
+#endif /* _EXECUTOR_XML_H */
Index: trunk/src/lib/util/loading/resource.cc
===================================================================
--- trunk/src/lib/util/loading/resource.cc	(revision 8148)
+++ trunk/src/lib/util/loading/resource.cc	(revision 8271)
@@ -26,5 +26,5 @@
 Resource::Resource (const std::string& fileName)
 {
-   this->setClassID(CL_RESOURCE, "Resource");
+//   this->setClassID(CL_RESOURCE, "Resource");
 
 }
