<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      Since this fix caused a few regressions I suggest to revert it
      back.<br>
      <br>
      15.10.2012 18:36, Tim English wrote:<br>
    </div>
    <blockquote cite="mid:SNT117-W15F2ACCB1FB19A62E98FA492710@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
      <div dir="ltr">
        Oleg,<br>
        &nbsp;<br>
        The inability to use a Choice as an "action" driver could be a
        huge change for some applications as they upgrade to 7.0 and
        definitely warrants re-consideration.<br>
        &nbsp;<br>
        It seemed like a reasonable enhancement request, and as
        developers we just LOVE creating new stuff and fixing stuff that
        is not working.&nbsp; I fell into the same trap... find the fix for
        the current problem. <br>
        &nbsp;<br>
        I am thinking of various action, validation or navigation
        strategies&nbsp;based on Choices that are affected.&nbsp; e.g. Choice
        selection opens certain detail dialog. User closes dialog,
        adjusts values on main form, &nbsp;and wants to view the same detail
        dialog again. (No event fired!)<br>
        &nbsp;<br>
        Cross platform is why&nbsp;I use and love Java. Windows, Mac,
        Linux,&nbsp;etc.&nbsp; consistency is the key<br>
        &nbsp;<br>
        Thanks for the diligence,<br>
        Tim<br>
        &nbsp;<br>
        P.S. The QA person who made the regression entry about failing a
        test is probably thinking "No one ever listens to QA."&nbsp; :-)
        Maybe they can update comments or documentation around the
        original QA test case&nbsp;that failed that captures the "action
        driver" aspect of why this should not fail.<br>
        &nbsp;<br>
        <div>
          &gt; Date: Mon, 15 Oct 2012 11:09:17 +0400<br>
          &gt; From: <a class="moz-txt-link-abbreviated" href="mailto:oleg.pekhovskiy@oracle.com">oleg.pekhovskiy@oracle.com</a><br>
          &gt; To: <a class="moz-txt-link-abbreviated" href="mailto:tim_english@hotmail.com">tim_english@hotmail.com</a><br>
          &gt; CC: <a class="moz-txt-link-abbreviated" href="mailto:denis.fokin@oracle.com">denis.fokin@oracle.com</a>; <a class="moz-txt-link-abbreviated" href="mailto:artem.ananiev@oracle.com">artem.ananiev@oracle.com</a>;
          <a class="moz-txt-link-abbreviated" href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
          &gt; Subject: Re: [8] Review request for 7171412: awt Choice
          doesn't fire ItemStateChange when selecting item after
          select() call - approved<br>
          &gt; <br>
          &gt; Hi Tim,<br>
          &gt; <br>
          &gt; I'm researching changes made for 6770017 in order to
          decide whether we <br>
          &gt; could revert them<br>
          &gt; or do it another way and return back firing of
          ItemStateChange always <br>
          &gt; for all platforms.<br>
          &gt; <br>
          &gt; Thanks,<br>
          &gt; Oleg<br>
          &gt; <br>
          &gt; 10/8/2012 4:39 PM, Tim English wrote:<br>
          &gt; &gt; Oleg,<br>
          &gt; &gt; I just saw your earlier email as well. I apologize
          that I do not have <br>
          &gt; &gt; an automated test. I did review the ".2" change and
          I am glad that you <br>
          &gt; &gt; all went with the better fix by eliminating the
          duplicate/triplicate <br>
          &gt; &gt; state. Thank you for keeping me in the loop directly
          as I have not <br>
          &gt; &gt; been keeping up with the digests.<br>
          &gt; &gt; All,<br>
          &gt; &gt;<br>
          &gt; &gt; Thought in hindsight... maybe the original
          enhancement request should <br>
          &gt; &gt; have just been rejected. If the user keeps picking
          the same item from <br>
          &gt; &gt; the list, they are probably expecting the software
          to do something! It <br>
          &gt; &gt; is possible for an event listener to check against
          previous state and <br>
          &gt; &gt; ignore extra messages(work around possible), it is
          NOT possible for an <br>
          &gt; &gt; event listener to react to an event that is NEVER
          fired (no work <br>
          &gt; &gt; around, must redesign UI).<br>
          &gt; &gt; &gt; BTW, native Choice controls fire event always
          on all platforms.<br>
          &gt; &gt; Similar reasoning might lie behind why the native
          platforms choose to <br>
          &gt; &gt; always fire: more flexibility to the developer.<br>
          &gt; &gt; Another possiblity would be to add a new control
          state to the Choice <br>
          &gt; &gt; control [ set/isFireAlreadySelected() ] and/or the
          selection Event [ <br>
          &gt; &gt; isAlreadySelected() ]. Default state for
          isFireAlreadySelecteded() <br>
          &gt; &gt; defaults to true to retain compatibility for older
          JVMs. User <br>
          &gt; &gt; requesting the original enhacement could set this to
          false to silence <br>
          &gt; &gt; the repeated selection methods.<br>
          &gt; &gt; Note that the original enhancement requester could
          have created a <br>
          &gt; &gt; Choice subclass to solve the duplicate firing
          result. (pseudo code)<br>
          &gt; &gt; class SingleFireChoice extends Choice {<br>
          &gt; &gt; Listeners singleFirelisteners;<br>
          &gt; &gt; addSingleFireListener(Listener
          onlyWantsToKnowIfChanged);<br>
          &gt; &gt; ... code to filter out duplicate selects<br>
          &gt; &gt; }<br>
          &gt; &gt;<br>
          &gt; &gt; I normally consider that the behavior between radio
          groups and choice <br>
          &gt; &gt; lists should operate on the same rules. (Just 2
          different views of the <br>
          &gt; &gt; same information) I wonder if radio groups fire an
          extra message if <br>
          &gt; &gt; you keep clicking the same radio button over and
          over again? It might <br>
          &gt; &gt; be an interesting experiment.<br>
          &gt; &gt;<br>
          &gt; &gt; I just happened to run an old Java utility that I
          wrote in 2000. I <br>
          &gt; &gt; had not run it since Java7 has been released.<br>
          &gt; &gt; It is still using an old 1.4 runtime, and as I was
          running it, I <br>
          &gt; &gt; realized that it will NOT work with the Java 7 JVM
          since it performs <br>
          &gt; &gt; an operation when a choice item is selected. The
          user might want to <br>
          &gt; &gt; perform the same operation repeatedly via the choice
          on different inputs.<br>
          &gt; &gt;<br>
          &gt; &gt; Basic test case that will now fail in the
          application is<br>
          &gt; &gt; 1. enter some text in TextArea "left"<br>
          &gt; &gt; 2. enter some text in TextArea "right"<br>
          &gt; &gt; 3. select an operation from the choice (left
          difference, right <br>
          &gt; &gt; difference, symmetric difference, union,
          intersection)<br>
          &gt; &gt; 4. review result in TextArea "result"<br>
          &gt; &gt; 5. change the text in "left" or "right" or both of
          the areas<br>
          &gt; &gt; 6. select the SAME operation again from the choice.<br>
          &gt; &gt; In J6 and lower, it will perform the operation on
          the new inputs.<br>
          &gt; &gt; In J7, nothing will happen and there is no way to
          know that the <br>
          &gt; &gt; user has attempted something.<br>
          &gt; &gt;<br>
          &gt; &gt; For step 6 to work in Java7 even after the patch for
          7171412, I will <br>
          &gt; &gt; have to switch to a different item and then switch
          back to the desired <br>
          &gt; &gt; item.<br>
          &gt; &gt; For upgrading the application to work reasonably
          with Java7 I will <br>
          &gt; &gt; need to add a separate "evaluate" button to "fire"
          the choice or else <br>
          &gt; &gt; change the choice items into individual buttons.<br>
          &gt; &gt;<br>
          &gt; &gt; Thanks for looking into this. With all the recent
          press on the <br>
          &gt; &gt; security items recently, I wasn't sure when someone
          would get a chance <br>
          &gt; &gt; to look into it. (My Personal Rant about security:
          Why do people allow <br>
          &gt; &gt; untrusted sites to run active X or applets in the
          first place? duh?)<br>
          &gt; &gt; I thank you all for your work on this,<br>
          &gt; &gt; Tim English<br>
          &gt; &gt;<br>
          &gt; &gt;<br>
          &gt; &gt; &gt; Date: Thu, 4 Oct 2012 13:33:59 +0400<br>
          &gt; &gt; &gt; From: <a class="moz-txt-link-abbreviated" href="mailto:oleg.pekhovskiy@oracle.com">oleg.pekhovskiy@oracle.com</a><br>
          &gt; &gt; &gt; To: <a class="moz-txt-link-abbreviated" href="mailto:denis.fokin@oracle.com">denis.fokin@oracle.com</a><br>
          &gt; &gt; &gt; CC: <a class="moz-txt-link-abbreviated" href="mailto:artem.ananiev@oracle.com">artem.ananiev@oracle.com</a>;
          <a class="moz-txt-link-abbreviated" href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a>; <br>
          &gt; &gt; <a class="moz-txt-link-abbreviated" href="mailto:tim_english@hotmail.com">tim_english@hotmail.com</a><br>
          &gt; &gt; &gt; Subject: Re: [8] Review request for 7171412:
          awt Choice doesn't fire <br>
          &gt; &gt; ItemStateChange when selecting item after select()
          call - approved<br>
          &gt; &gt; &gt;<br>
          &gt; &gt; &gt; Hi Denis,<br>
          &gt; &gt; &gt;<br>
          &gt; &gt; &gt; there are behavior differences for Choice
          across the platforms.<br>
          &gt; &gt; &gt; on Windows - if we choose the same item twice
          ItemStateChange is not<br>
          &gt; &gt; &gt; fired twice but for other platform it is so.<br>
          &gt; &gt; &gt; There is a separate issue about that 7159935,
          so all platform should<br>
          &gt; &gt; &gt; behave like Windows does.<br>
          &gt; &gt; &gt;<br>
          &gt; &gt; &gt; BTW, native Choice controls fire event always
          on all platforms.<br>
          &gt; &gt; &gt;<br>
          &gt; &gt; &gt; Thanks,<br>
          &gt; &gt; &gt; Oleg<br>
          &gt; &gt; &gt;<br>
          &gt; &gt; &gt; 10/3/2012 5:47 PM, Denis S. Fokin wrote:<br>
          &gt; &gt; &gt; &gt; Hi Oleg,<br>
          &gt; &gt; &gt; &gt;<br>
          &gt; &gt; &gt; &gt; the fix looks good. It was interesting to
          verify the functionality on<br>
          &gt; &gt; &gt; &gt; Linux. On my Ubuntu everything works
          properly.<br>
          &gt; &gt; &gt; &gt;<br>
          &gt; &gt; &gt; &gt; Thank you,<br>
          &gt; &gt; &gt; &gt; Denis.<br>
          &gt; &gt; &gt; &gt;<br>
          &gt; &gt; &gt; &gt; On 10/2/2012 6:48 PM, Artem Ananiev wrote:<br>
          &gt; &gt; &gt; &gt;&gt; Hi, Oleg,<br>
          &gt; &gt; &gt; &gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt; the new version looks fine.<br>
          &gt; &gt; &gt; &gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt; Thanks,<br>
          &gt; &gt; &gt; &gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt; Artem<br>
          &gt; &gt; &gt; &gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt; On 10/2/2012 4:30 PM, Oleg Pekhovskiy
          wrote:<br>
          &gt; &gt; &gt; &gt;&gt;&gt; Hi Artem,<br>
          &gt; &gt; &gt; &gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt; thank you for the review, I made
          changes you proposed there:<br>
          &gt; &gt; &gt; &gt;&gt;&gt;
          <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~bagiras/8/7171412.2">http://cr.openjdk.java.net/~bagiras/8/7171412.2</a><br>
          &gt; &gt; &gt; &gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt; Please tell if everything is ok.<br>
          &gt; &gt; &gt; &gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt; Thanks,<br>
          &gt; &gt; &gt; &gt;&gt;&gt; Oleg<br>
          &gt; &gt; &gt; &gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt; 10/1/2012 2:23 PM, Artem Ananiev
          wrote:<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; Hi, Oleg,<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; (adding Tim to copy)<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; the fix looks fine. Could you
          please make selectedIndexID just a<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; static variable in
          awt_Choice.cpp instead of AwtChoice member?<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; Thanks,<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; Artem<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt; On 10/1/2012 2:09 PM, Oleg
          Pekhovskiy wrote:<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Hi!<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Please review the fix for
          CR:<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
          <a class="moz-txt-link-freetext" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7171412">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7171412</a><br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Webrev:<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
          <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~bagiras/8/7171412.1/">http://cr.openjdk.java.net/~bagiras/8/7171412.1/</a><br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; I left the idea of the fix
          CR 6770017 but refused of using <br>
          &gt; &gt; doubling<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; native variable for
          storing previously selected index<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; (that also caused the
          problem described in the current issue).<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Thanks,<br>
          &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Oleg<br>
          &gt; &gt; &gt; &gt;&gt;&gt;<br>
          &gt; &gt; &gt; &gt;<br>
          &gt; &gt; &gt;<br>
          &gt; <br>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best regards, Sergey. </pre>
  </body>
</html>