Re: File browser
Peter Duniho wrote:
I am not proposing to write code in violation of recommendations. I am
proposing to know the difference between what is guaranteed not to work,
and what is simply recommended so as to ensure something always works
without additional effort.
There is a third category - what is not guaranteed to work.
Running GUI events off the EDT is a known source of bugs. That's why Sun now
uses the word "must" with putting GUI events on the EDT.
How you interpret that is up to you. But Sun has warned us that running GUI
events *off* the EDT /might/ work. It's not guaranteed not to work. It's not
guaranteed to work. It is guaranteed to cause trouble under certain
circumstances, circumstances that can occur when a program is ported from an
environment where it appeared to work to a different platform. It's a bad
practice - that is certain.
Whether you call it a "recommendation" or an "imperative" is entirely your
choice. But the facts have been laid out, and GIYF for finding more evidence
in that area.
Let's look at a different but related synchronization issue. If two threads
access a common object for both read and write, must you use synchronization
to coordinate the two threads with respect to that object, or is that a
recommendation? After all, on some platforms if you're lucky the program
might seem to work without synchronization.
--
Lew