NSTableView apparently doesn't respect allows EmptySelection:NO anymore on Leopard

  • Hello!

    Has anyone else noticed that since Leopard NSTableView doesn’t respect
    allowsEmptySelection:NO anymore?

    Whether set in IB or programmatically, and setting the
    NSArrayController avoidEmptySelection bit doesn’t help.

    This happens in a project that is still working perfectly on Leopard
    whenever built on Tiger.

    My table view gets its content with a filterPerdicate binding that
    returns no object and looses selection, when the predicate changes and
    populates the table with some objects again, empty selection is
    allowed, no object gets selected, forcing the user to click on an item
    to select it.

    Why is my project behaving differently from on Tiger?

    Thanks in advance for any answer!

    Flofl.
  • On samedi, novembre 24, 2007, at 10:47  AM, Wdyp wrote:

    > Hello!
    >
    > Has anyone else noticed that since Leopard NSTableView doesn’t respect
    > allowsEmptySelection:NO anymore?
    >
    > Whether set in IB or programmatically, and setting the
    > NSArrayController avoidEmptySelection bit doesn’t help.
    >
    > This happens in a project that is still working perfectly on Leopard
    > whenever built on Tiger.
    >
    > My table view gets its content with a filterPerdicate binding that
    > returns no object and looses selection, when the predicate changes and
    > populates the table with some objects again, empty selection is
    > allowed, no object gets selected, forcing the user to click on an item
    > to select it.
    >
    > Why is my project behaving differently from on Tiger?

    Honestly, it might not be such as bad move. Because in Tiger and
    earlier version, the behavior for this was quite buggy.

    In many cases, the tableView:selectionDidChange: delegate callback was
    not sent and you had to call it yourself.
  • On Nov 24, 2007, at 1:47 AM, Wdyp wrote:

    > Hello!
    >
    > Has anyone else noticed that since Leopard NSTableView doesn’t
    > respect allowsEmptySelection:NO anymore?
    >
    > Whether set in IB or programmatically, and setting the
    > NSArrayController avoidEmptySelection bit doesn’t help.
    >
    > This happens in a project that is still working perfectly on Leopard
    > whenever built on Tiger.
    >
    > My table view gets its content with a filterPerdicate binding that
    > returns no object and looses selection, when the predicate changes
    > and populates the table with some objects again, empty selection is
    > allowed, no object gets selected, forcing the user to click on an
    > item to select it.
    >
    > Why is my project behaving differently from on Tiger?

    This simply sounds like a bug, however, there may be a very valid
    reason why this change happened. I can't say for sure without looking
    at code for it. Please log a bug, and if you have time, create a
    sample program that illustrates the problem (that will greatly speed
    up the process of finding what is wrong and possibly getting it fixed).

    For the time being, I'd suggest making sure the selection is
    maintained yourself whenever the filter changes.

    --corbin
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today