Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-948

Allow selected key bindings to work with unselected items

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3, 2.0.4
    • 2.1, 2.0.5
    • wtk
    • All

    Description

      If you set a selected key binding (on a ListButton, ListView, TableView or Spinner), and invoke the "store" method when no item is selected, you can get an error about not being able to assign "null" to an "int" field (in my case).
      The problem is that "store" tests for nothing being selected and sets the item to null without even calling the binding method. In my case, I am using the binding to just store the selected index as an integer, so the item will not end up being null, except that the binding method is never called.
      So, the item value to be stored should be left up to the binding method, even in the "unselected" case in order to be consistent (and to allow my selected index bind mapping to work correctly, even in the unselected case).
      It will be more clear what the problem is when you see the patch file.

      Attachments

        1. binding.patch
          5 kB
          Roger Lee Whitcomb

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            rwhitcomb Roger Lee Whitcomb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: