X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogic.cpp;h=db382fe6074f14aebea7293d61808f1ff0e5c100;hb=9fdbf99cdb3c5620e665c3ecb34e83d778cb311a;hp=85ec710def369c7b6764e0cb69f0e628f03e8af6;hpb=0af3c2393bd00f39db3bfaf5b78a7a44f0fd5ff1;p=libs%2Fgltk.git diff --git a/source/logic.cpp b/source/logic.cpp index 85ec710..db382fe 100644 --- a/source/logic.cpp +++ b/source/logic.cpp @@ -1,10 +1,4 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include "logic.h" using namespace std; @@ -21,13 +15,10 @@ Logic::Loader::Loader(Logic &l, const map &w): void Logic::Loader::bind(const string &wdg, const string &data) { - map::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);