Design Advice Sought for Interesting NSTableView

  • I am making an NSTableView in my app that has one column with an interesting
    structure.  Each row in the table will be one subtask that is running for
    the application.  I want each row to look like this:

      <task description>
      <count remaining> <progress indicator>

    No, that didn't get wrapped funny in email, I want each table row to be
    multiple lines.  For example:

      Scanning folder: xx/xxx
      1328 [----------            ]

    With (of course) a real progress indicator in there.  Obviously it will be
    read-only, and the only action would be that if you click (double-click?) on
    a row it would show you more detail on the progress of the task.

    My question is how best to implement this.

    I clearly will need some subclass of NSCell for the table view, but beyond
    that I'm a bit stumped as to the best way to handle it.  Should this be an
    NSImageCell with me attempting to draw this myself?  I know how to draw the
    text and numbers, but clearly don't want to try to draw the progress
    indicator.  So, I'm a bit lost about how to start.

    Can anyone help me with advice, a pointer to a sample I've overlooked,
    or...?

    Thanks,
    Chris
  • On Nov 18, 2007, at 6:30 PM, Chris Williams wrote:

    > I clearly will need some subclass of NSCell for the table view, but
    > beyond
    > that I'm a bit stumped as to the best way to handle it.  Should this
    > be an
    > NSImageCell with me attempting to draw this myself?  I know how to
    > draw the
    > text and numbers, but clearly don't want to try to draw the progress
    > indicator.  So, I'm a bit lost about how to start.

    Have a look at NSCollectionView (New for Leopard).

    j o a r
  • Hi Chris,

    On 2007-11-19, at 13:00, Chris Williams wrote:

    > I am making an NSTableView in my app that has one column with an
    > interesting
    > structure.  Each row in the table will be one subtask that is
    > running for
    > the application.  I want each row to look like this:

    Take a look at the code for Transmission, which does a similar thing. <http://transmission.m0k.org/>

    (I haven't looked at it myself, so I can't vouch that they've done it
    in a sane way.)

    Jonathon Mah
    <me...>
  • Thanks for the excellent pointer, that's really close to what I'm trying to
    do.  They appear to be doing it a moderately "sane" way.  It's an
    NSImageCell and they draw it all including the progress bar.  There's a
    bunch of code commented out that would use NSProgressIndicator -- but they
    apparently couldn't get it to work.

    I'd prefer the simplicity of using NSProgressIndicator, but their progress
    bar looks good, I may *borrow* it. :)

    On 11/18/07 9:07 PM, "Jonathon Mah" <me...> wrote:

    > Hi Chris,
    >
    > On 2007-11-19, at 13:00, Chris Williams wrote:
    >
    >> I am making an NSTableView in my app that has one column with an
    >> interesting
    >> structure.  Each row in the table will be one subtask that is
    >> running for
    >> the application.  I want each row to look like this:
    >
    >
    > Take a look at the code for Transmission, which does a similar thing.
    > <http://transmission.m0k.org/
    >>
    >
    > (I haven't looked at it myself, so I can't vouch that they've done it
    > in a sane way.)
    >
    >
    >
    > Jonathon Mah
    > <me...>
    >
    >
  • On Nov 18, 2007, at 9:37 PM, Chris Williams wrote:

    > I'd prefer the simplicity of using NSProgressIndicator

    So why don't you? NSCollectionView allows you to do that.

    j o a r
  • Because, shock of shocks, neither I nor the people running the app are using
    Leopard yet.

    From: j o a r <joar...>
    Subject: Re: Design Advice Sought for Interesting NSTableView

    On Nov 18, 2007, at 9:37 PM, Chris Williams wrote:

    > I'd prefer the simplicity of using NSProgressIndicator

    So why don't you? NSCollectionView allows you to do that.

    j o a r
  • On 11/19/07, Chris Williams <chris...> wrote:
    > Because, shock of shocks, neither I nor the people running the app are using
    > Leopard yet.

      ... or ... http://www.stepwise.com/Articles/Technical/2003-12-20.01.html

    --
    I.S.
  • Thank you very much, that'll do it.

    Joar, sorry my reply seemed "snarky", but it appears you answered my
    question four years ago -- as IS just pointed out.  Thank you for that as
    well.

    On 11/19/07 7:46 AM, "I. Savant" <idiotsavant2005...> wrote:

    > On 11/19/07, Chris Williams <chris...> wrote:
    >> Because, shock of shocks, neither I nor the people running the app are using
    >> Leopard yet.
    >
    > ... or ... http://www.stepwise.com/Articles/Technical/2003-12-20.01.html
    >
    > --
    > I.S.
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