• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

event order guarantee?

 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
To continue a topic someone else pondered a couple of days ago...
Is there any guarantee that events will be received by the GUI (event handlers) in the order that they were generated?
Thank You,
-Dirk Schreckmann
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, there is. Otherwise how could you type a series of characters and expect that the keys will be read in the correct order? It would be impossible to write any sort of text editor, for example. Instead, it is guaranteed that a single listener will always observe multiple events in the order they were generated. What is not guaranteed is the order in which multiple listeners will be notified of a single event. So if there are three events with multiple listeners - first all listeners will be notified of event 1 (in unknown order), then all listeners will be notified of event 2 (again in unknown and possibly different order), and then all listeners will be notified of event 3 (etc).
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jim, that's exactly what I wanted to know.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic