Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 1.6.3
    • Component/s: Autocomplete
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      464

      Description

      I use AutoCompleteDecorator on a combobox that contains items with different
      cases like
      "Foo" and "foo". when typing 'f', the proposed choice is always 'Foo', no way to
      change the case, the upper case is forced. Note this happens as well on
      characters at every position.

        Activity

        Hide
        bierhance added a comment -

        Manual test case

        Show
        bierhance added a comment - Manual test case
        Hide
        Karl Schaefer added a comment -

        Thomas, everything seems to be working fine, but do not make the Comparator's public because the implemetations are broken. If EQUALS_IGNORE_CASE.compare(s1, s2) !=0, then EQUALS_IGNORE_CASE.compare(s1, s2) == -EQUALS_IGNORE_CASE.compare(s2, s1), but it doesn't. I would document the brokenness (or fix them, but that really adds a bunch of weight that we don't need), but keep them in the default scope. It might even be better to place them in the AutoComplete class, which I have been using as a place to collect some package-private code.

        Furthermore, keeping that internal for now will benefit us, because we will have the chance to change our minds/improve upon this groundwork for SWINGX-739, giving the users the option of a startsWith or a contains.

        Show
        Karl Schaefer added a comment - Thomas, everything seems to be working fine, but do not make the Comparator's public because the implemetations are broken. If EQUALS_IGNORE_CASE.compare(s1, s2) !=0, then EQUALS_IGNORE_CASE.compare(s1, s2) == -EQUALS_IGNORE_CASE.compare(s2, s1), but it doesn't. I would document the brokenness (or fix them, but that really adds a bunch of weight that we don't need), but keep them in the default scope. It might even be better to place them in the AutoComplete class, which I have been using as a place to collect some package-private code. Furthermore, keeping that internal for now will benefit us, because we will have the chance to change our minds/improve upon this groundwork for SWINGX-739 , giving the users the option of a startsWith or a contains.
        Hide
        bierhance added a comment -

        Revision: 3944
        Author: bierhance
        Date: 2011-03-04 16:33
        Message: Auto completion now prefers matching case. Comments from the review by Karl Schaefer were incorporated.
        Issue #SWINGX-464 - AutoCompleteDecorator forces case

        Show
        bierhance added a comment - Revision: 3944 Author: bierhance Date: 2011-03-04 16:33 Message: Auto completion now prefers matching case. Comments from the review by Karl Schaefer were incorporated. Issue # SWINGX-464 - AutoCompleteDecorator forces case
        Hide
        bflorat added a comment -

        Hi there, congratulations for 1.6.3.

        I just tried the 1.6.3 build (BTW, I spent more half an hour crawling on around ten or more swingx websites /maven repository website/ tickets systems and finally found in some obscure forum thread that the artifact download is available from the Swingx Nexus at [1] , I guess the download link is not that obvious or is it me ?)

        Unfortunately, the bug is still there (or is it a similar one?) . For instance, I have in my list : "Unknown",
        I type : "U n K" , swingx forces : "U n k" instead so I cannot type "UnKown", "Unknown" is forced.

        I am thus stuck for now with my fix (see my code previously posted on this ticket).

        Thanks for consideration.

        [1] https://maven.java.net/index.html#nexus-search;quick~swingx

        Show
        bflorat added a comment - Hi there, congratulations for 1.6.3. I just tried the 1.6.3 build (BTW, I spent more half an hour crawling on around ten or more swingx websites /maven repository website/ tickets systems and finally found in some obscure forum thread that the artifact download is available from the Swingx Nexus at [1] , I guess the download link is not that obvious or is it me ?) Unfortunately, the bug is still there (or is it a similar one?) . For instance, I have in my list : "Unknown", I type : "U n K" , swingx forces : "U n k" instead so I cannot type "UnKown", "Unknown" is forced. I am thus stuck for now with my fix (see my code previously posted on this ticket). Thanks for consideration. [1] https://maven.java.net/index.html#nexus-search;quick~swingx
        Hide
        Karl Schaefer added a comment -

        Hmm, well SwingX is available via Maven Central, so I'm not sure what all that hullabaloo is about. You should be able to get it from there always.

        To the point at hand of this bug: I think the solution if for differentating between two different, but similar provided options. I think that's the correct solution.

        What you're describing is non-strict matching should allow for case variant of potential matches to be manually added, yes? If so, then we'd need a completely different mechanism, such that we match exact for case, so you would no longer be able to type 'f' to get 'Foo' even if 'Foo' were the only item beginning with 'f'. I think that could get really confusing.

        Show
        Karl Schaefer added a comment - Hmm, well SwingX is available via Maven Central, so I'm not sure what all that hullabaloo is about. You should be able to get it from there always. To the point at hand of this bug: I think the solution if for differentating between two different, but similar provided options. I think that's the correct solution. What you're describing is non-strict matching should allow for case variant of potential matches to be manually added, yes? If so, then we'd need a completely different mechanism, such that we match exact for case, so you would no longer be able to type 'f' to get 'Foo' even if 'Foo' were the only item beginning with 'f'. I think that could get really confusing.

          People

          • Assignee:
            bierhance
            Reporter:
            bflorat
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: