NSProgressIndicator -- delete the first message with same title

2008-05-23 Thread John Love
I have successfully been able to create a small Cocoa multiple document project whose GUI consists of a NSProgressIndicator, or wheel, and a Button, titled Spin. In the .nib window, the Controller is ctrl-dragged to the wheel, specifying an outlet wheel and the Button is ctrl-dragged to the

Re: NSProgressIndicator -- delete the first message with same title

2008-05-23 Thread Graham Cox
Why are you autoreleasing the NSProgressIndicator? That means that when the pool is released, your spinner pointer will go stale. Odds are it will crash - not sure why it isn't doing so in the first case. Also, if it's an IBOutlet why are you assigning to it? This isn't actually harmful,

Re: NSProgressIndicator -- delete the first message with same title

2008-05-23 Thread Graham Cox
On a further check of the docs this is probably not it, because init is the designated initializer. But in any case, you ought to start logging and/or asserting your expectations, so that any invalid pointers and so on stand out like a sore thumb in the log - you'll get to the bottom of

Re: NSProgressIndicator -- delete the first message with same title

2008-05-23 Thread Jens Alfke
On 23 May '08, at 4:43 AM, John Love wrote: Changing the spin method to look like: - (void) spinIt:(BOOL)begin { if (begin) [spinner startAnimation:nil]; else[spinner stopAnimation:nil]; } Looks good. @interface MyDocument:NSDocument { IBOutlet Controller *theControl; }