X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogic.cpp;h=db382fe6074f14aebea7293d61808f1ff0e5c100;hb=c1faa54a3218b53757b8b55de0ff8aa64412253b;hp=3ed745c09c9e083233efada18fb76d6d94c707e3;hpb=8352d5f2590cfcb09e92854be211399105408c4d;p=libs%2Fgltk.git diff --git a/source/logic.cpp b/source/logic.cpp index 3ed745c..db382fe 100644 --- a/source/logic.cpp +++ b/source/logic.cpp @@ -1,3 +1,4 @@ +#include #include "logic.h" using namespace std; @@ -14,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);