fixed error when an event does not exist
#include "calcu.h"
#include "text.h"
-enum event_type
-{
- EVENT_INIT = 0,
- EVENT_RELEASE,
- EVENT_FOCUS_ON,
- EVENT_FOCUS_OFF,
- EVENT_BTN_PUSH,
- EVENT_BTN_HOLD,
- EVENT_PTN_FREE,
- EVENT_NUMBER
-};
+typedef size_t action_type;
+typedef size_t event_type;
// variable scope
enum
public:
Tag *tag;
+ ActionParser()
+ {
+ tag = NULL;
+ }
+
const char* getName(void)
{
const char* name = tag->param.getString(0);
{
DCODE(printf("LMLActorObject::setAction(%d)\n", type);)
ActionParser *action = parser->actionContainer[type];
- if (action == NULL) return false;
+ if (action->tag == NULL) return false;
setAction(action);
return true;
{
DCODE(printf("LMLActorObject::setEvent(%d)\n", type);)
EventParser *event = parser->eventContainer[type];
- if (event == NULL) return false;
+ if (event->tag == NULL) return false;
return setEvent(event);
}
} XML_TAGRTN;
typedef size_t tag_type;
-typedef size_t action_type;
typedef size_t param_type;
class Parameter;