logo       
Google Custom Search
    AddThis Social Bookmark Button

Re[2]: Combo box going in and out of focus: msg#00028

Subject: Re[2]: Combo box going in and out of focus
On Fri, 11 Jun 2004 11:55:40 -0700 Brent Villalobos 
<brent.villalobos@xxxxxxxxxxxxxxxx> wrote:

  Hello,

> Wow, that works, but I don't know why it works.  Does anyone have a quick
> explaination as to what the event.Skip() is doing in the context of event
> handling?  I tried going through the event handling documentation, but it
> was a bit confusing it didn't give me a really good idea on how events work.

  If you do not call ->Skip you are (implicitly) telling the event system
that is should stop processing the event. This is sometimes useful
for example for preventing a control getting a particular event. As you have
discovered the hard way, *not* calling ->Skip might lead to weird bugs.
While I have some ideas about the safety of not calling ->Skip on certain kinds 
of
events [1], it is safer to always call it.

  Yes, it might be slightly confusing.

HTH
Mattia

[1] in general, not calling ->Skip should be safe for events you catch on
    an ancestor of the window generating them (i.e. EVT_BUTTON( $self, $button, 
... )
    where $self != $button). For events you catch on the window generating them,
    for example focus, mouse motion anc click, keyboard events it is safer to
    always ->Skip.



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>