-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/core/maputils.h>
#include "logic.h"
using namespace std;
void Logic::Loader::bind(const string &wdg, const string &data)
{
- map<string, Widget *>::const_iterator i = widgets.find(wdg);
- if(i==widgets.end())
- throw KeyError("Unknown widget", wdg);
+ WidgetBinding act;
+ act.wdg = get_item(widgets, wdg);
string::size_type colon = data.find(':');
- WidgetBinding act;
- act.wdg = i->second;
act.type = data.substr(0, colon);
if(colon!=string::npos)
act.data = data.substr(colon+1);