• 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: troubles with a progress bar updating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: troubles with a progress bar updating


  • Subject: Re: troubles with a progress bar updating
  • From: Shawn Erickson <email@hidden>
  • Date: Sun, 11 Dec 2005 12:36:07 -0800


On Dec 11, 2005, at 11:11 AM, Jeff Childers wrote:

I cant seemed to get my progress bar to update. When I create the object I tried to
set it to 50% but it won't update.

@implementation WindowController

-(void)awakeFromNib{
thisProgress = [[MyProgressIndicator alloc] init];
NSLog(@"loaded");
}

--------------------------------------------------------
@interface MyProgressIndicator : NSObject
{
IBOutlet id progressBar;
int currentProgress;
int incrementer;
}

It looks like you have a window controller instantiated in your nib and it has an outlet to a progress bar that you dragged and dropped into a window in your nib, right?

If that is true then this "thisProgress = [[MyProgressIndicator alloc] init];" is resulting in your outlet pointing at a new instance of your MyProgressIndicator, one that it not in any view or window instead of the instance you likely connected it with in your nib. If you are using a subclass of NSProgressView (which it looks like) then in IB drag and drop an NSProgressView instance and then set it to you custom subclass (properties panel option).

Also I see display and displayIfNeeded calls in your code.... bad habit to have unless really immediate drawing. You should be sending your views setNeedsDisplay:YES instead otherwise you could be triggering over drawing. Anyway setting the progress indicators value should be enough to get it to redisplay itself.

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >troubles with a progress bar updating (From: Jeff Childers <email@hidden>)

  • Prev by Date: Re: event pressure:
  • Next by Date: Re: Can I Send Apple Events in Cocoa?
  • Previous by thread: troubles with a progress bar updating
  • Next by thread: NSWindow backing
  • Index(es):
    • Date
    • Thread