Possibly it is just me being fairly new to DB, but how would one
define a certain event type, eg OnRightUp for eg 2 different window
elements?
Example:
If you define the OnRightUp event for the first element, something
like this:
*!
* wxEVT_RIGHT_UP event handler for MyElement
*/
void Program::OnRightUp( wxMouseEvent& event )
{
////
begin wxEVT_RIGHT_UP event handler for MyElement in Program.
// Before editing this code, remove the block markers.
wxMessageBox("hello");
////
end wxEVT_RIGHT_UP event handler for MyElement in Program.
}
is correctly added to the cpp file (note: the generated comment refers
to the element, but the code has no reference to the element id!).
However, adding the same event type to the second element, either
overrules the first update or does nothing depending what action is
chosen for the event handler.
Am I correct to assume that an event like OnRightUp is actually an
event for the parent window of the element and not for the element it
self? In this case, it makes sense to add something like this:
switch (event.GetId();)
{
case 10027:
break;
...}
To the generated event handler or critically look at the DB event user
interface that in it's current form suggests that the event is
available per element.
... or am I completely off course?
Closing note: it seems not all events are dealt with the same way, eg
a COMMAND_BUTTON_CLICKED event is element aware and does generate the
appropriate code for individual elements.
.