• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSProgressIndicator in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSProgressIndicator in NSTableView


  • Subject: Re: NSProgressIndicator in NSTableView
  • From: Jan Van Tol <email@hidden>
  • Date: Sun, 25 May 2003 11:59:19 -0500

Thanks for the suggestions, but they don't work, unfortunately. I think I'll just do a custom view like Quentin suggested.

Best,
-Jan Van Tol

On Sunday, May 25, 2003, at 03:04 AM, Tobias Hermann wrote:

Hi!

It's not easy to do that because NSProgressIndicator does not use a cell for it's displaying :-(
With that hack you made, you have to be careful, because you add a subview every time the tableView wants to draw that indicator cell. Or does addSubview check out whether or not a view already was added before ?

If you use a NSMatrix, you have the same problems because an NSMatrix uses cells for displaying as well...

Try to run the progressViewer in a separate thread (to solve the animation problem).
use
[progressView setUsesThreadedAnimation: YES];
for that.
But be careful: THe app gets multithreaded that way, which may not be what you want.

regards

Tobi

ps: These are only suggestions... I never tried to add progress indicators to a table view yet... hopefully somebody who already did will answer to this thread, too.

On Sunday, May 25, 2003, at 03:34 AM, Jan Van Tol wrote:

I know this has been discussed several times before, but I haven't been able to find a satisfactory solution. I'm using the following code I adapted from the archives in my NSCell subclass to attempt to display a progress bar in my table view. The problem is with getting the bar to animate properly. When I first open the window it's in, it animates fine, until I resize the window, or click the table or something, when it stops. It won't animate after that.

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
[controlView addSubview:progressView];
[progressView setFrame:cellFrame];
}

To me this looks like a pretty hackish solution, but it's the closest I've gotten this work.

I'm trying to implement a Mail.app-style activity viewer. Is a tableView even the best way to do this? Perhaps an NSMatrix or custom view would be easier?

Thanks,
-Jan Van Tol
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSProgressIndicator in NSTableView (From: Tobias Hermann <email@hidden>)

  • Prev by Date: Re: Safari download window "clear" button
  • Next by Date: Parameter-Problem while calling AppleScript from Cocoa
  • Previous by thread: Re: NSProgressIndicator in NSTableView
  • Next by thread: Re: NSProgressIndicator in NSTableView
  • Index(es):
    • Date
    • Thread