complex views in a tableview

  • Hi all,

    I'm looking to put some "complex" content into a tableview, specifically
    a few controls not directly supported by IB.

    I've discovered joar's great "Subview-TableView" example <http://
    www.joar.com/code/> and it seems to be the best approach, but I wanted
    to check with others because it's 4 years old.  I'm targeting 10.5.2 or later.

    Thanks,

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • On Feb 27, 2008, at 9:30 PM, Sean McBride wrote:

    > I've discovered joar's great "Subview-TableView" example <http://
    > www.joar.com/code/> and it seems to be the best approach, but I wanted
    > to check with others because it's 4 years old.  I'm targeting 10.5.2
    > or later.

    Thanks!

    On 10.5 and later I would recommend NSCollectionView, or alternatively
    NSRuleEditor/NSPredicateEditor, depending on what you're trying to
    solve. My SubViewTableView was always a hack looking for a proper
    solution - And with 10.5 we have that.

    Cheers,

    j o a r
  • On 2/27/08 10:09 PM, j o a r said:

    > On 10.5 and later I would recommend NSCollectionView, or alternatively
    > NSRuleEditor/NSPredicateEditor, depending on what you're trying to
    > solve. My SubViewTableView was always a hack looking for a proper
    > solution - And with 10.5 we have that.

    I haven't used NSCollectionView but I have read about it.  It seems to
    be geared towards grids more than lists.  I'm looking to have a table
    with 2 resizable columns: the first a simple string, the second my
    'complex view'.  I'm not sure I could really do that with a collection
    view.  If it were two columns, would it still do selection in terms of rows?

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • On Feb 27, 2008, at 11:13 PM, Sean McBride wrote:

    > I haven't used NSCollectionView but I have read about it.  It seems to
    > be geared towards grids more than lists.  I'm looking to have a table
    > with 2 resizable columns: the first a simple string, the second my
    > 'complex view'.  I'm not sure I could really do that with a collection
    > view.  If it were two columns, would it still do selection in terms
    > of rows?

    No, it wouldn't. So, I guess it comes down to this: There is no
    control provided by Apple that does exactly what you want, so you
    would either have to build something from scratch yourself, or attempt
    to modify / tweak / hack one of the existing controls. You can hack
    the NSTableView to sort of work that way, like I showed with my
    SubViewTableView example, or you might be able to hack the
    NSCollectionView to sort of work that way.

    Good luck!

    j o a r
  • On 2/28/08 7:15 PM, j o a r said:

    >> I haven't used NSCollectionView but I have read about it.  It seems to
    >> be geared towards grids more than lists.  I'm looking to have a table
    >> with 2 resizable columns: the first a simple string, the second my
    >> 'complex view'.  I'm not sure I could really do that with a collection
    >> view.  If it were two columns, would it still do selection in terms
    >> of rows?
    >
    > No, it wouldn't. So, I guess it comes down to this: There is no
    > control provided by Apple that does exactly what you want, so you
    > would either have to build something from scratch yourself, or attempt
    > to modify / tweak / hack one of the existing controls. You can hack

    That's what I figured, but wanted to check here first...

    > the NSTableView to sort of work that way, like I showed with my
    > SubViewTableView example, or you might be able to hack the
    > NSCollectionView to sort of work that way.

    I guess your example is still the best starting point then.

    Thanks!

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada