× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Joe Pluta wrote:
Ugh. This is a tough one, David.

Tell me about it :) SWT gives me a headache.

You want to see if the select event has fired when processing the
focus lost but I don't think you can because the select event hasn't
fired yet.

More specifically, I want to check to see if the select event WILL fire (so I can skip the validation logic in the focus event).

Have you tried simply logging the events to see if indeed that is the
case?

Yep, I'm sure it's happening.

It makes sense, of course ... the focus lost event on the current control should fire before the select event on the next control.

I just tried adding a filter listener attached to the displays Selection event ... which, I assumed, would fire before the events do. But it appears that the filters and events on control 1 fire before the filters and events on control 2.

I thought, for a minute, that the mouse event on the button might be getting fired before the focus lost event (by inspecting the stack in debug) ... but, no, the event is just added to the event queue.

Of course, there are always ways around this--such as the focus event
spawning a thread that in turn sends a message delayed a few
milliseconds that actually executes the focus logic but only if a
specific intervening event hasn't occurred--but it's an awful lot of
work.

That gives me a headache just thinking about it. I'm sure it would work ... but it would require that I completely re-engineer the panel that I'm working on.

Time for more digging.

david


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.