From b16f06168bdb0680135af08fc231ba47ec81fdd0 Mon Sep 17 00:00:00 2001 From: Peter Schojer Date: Wed, 3 Sep 2008 14:10:43 +0000 Subject: [PATCH] fixed afterLoad event --- WebWidgets/include/Poco/WebWidgets/ComboBox.h | 3 +++ WebWidgets/src/ComboBox.cpp | 8 ++++++++ WebWidgets/src/ComboBoxCell.cpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/WebWidgets/include/Poco/WebWidgets/ComboBox.h b/WebWidgets/include/Poco/WebWidgets/ComboBox.h index fedd17fd8..032c44506 100644 --- a/WebWidgets/include/Poco/WebWidgets/ComboBox.h +++ b/WebWidgets/include/Poco/WebWidgets/ComboBox.h @@ -128,6 +128,9 @@ protected: void fireSelected(void* pSender); /// Fires the selected event. + + void fireAfterLoad(void* pSender); + /// Fires the afterLoad event. }; diff --git a/WebWidgets/src/ComboBox.cpp b/WebWidgets/src/ComboBox.cpp index b043565b6..b0024c855 100644 --- a/WebWidgets/src/ComboBox.cpp +++ b/WebWidgets/src/ComboBox.cpp @@ -47,6 +47,7 @@ ComboBox::ComboBox(const std::string& name, const std::type_info& type): { ComboBoxCell::Ptr pCell = cell(); pCell->selected = delegate(*this, &ComboBox::fireSelected); + pCell->afterLoad = delegate(*this, &ComboBox::fireAfterLoad); } @@ -86,4 +87,11 @@ void ComboBox::fireSelected(void* pSender) } +void ComboBox::fireAfterLoad(void* pSender) +{ + ComboBoxEvent sel(this); + afterLoad(this, sel); +} + + } } // namespace Poco::WebWidgets diff --git a/WebWidgets/src/ComboBoxCell.cpp b/WebWidgets/src/ComboBoxCell.cpp index 1cdff01be..6b33829d0 100644 --- a/WebWidgets/src/ComboBoxCell.cpp +++ b/WebWidgets/src/ComboBoxCell.cpp @@ -43,7 +43,7 @@ namespace WebWidgets { const std::string ComboBoxCell::FIELD_VAL("val"); -const std::string ComboBoxCell::EV_LOAD("beforeLoad"); +const std::string ComboBoxCell::EV_LOAD("doLoad"); const std::string ComboBoxCell::EV_AFTERLOAD("afterLoad"); const std::string ComboBoxCell::EV_SELECTED("sel");