bool InputManager::InvokeEvent(const wxString& actionname, wxWindow* win) { // look up a python delegate for the given actionname DelegateIter i = handlers.find(actionname); if (i != handlers.end()) { PyObject* delegate = i.second(); if (delegate) return callPythonDelegate(delegate, win); } return false; }
void FlashControl::handleFlashCall(const std::wstring& xmlString) { std::wstring funcName; Arguments args; if(!Impl::deserializeInvocation(xmlString, funcName, args)) return; DelegateIter i = delegateMap.find(funcName); if(i != delegateMap.end()) { FlashValue retval = i->second(this, args); flashInterface->SetReturnValue(Impl::serializeValue(retval).c_str()); } }