• 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: Progress bar on front NSPanel is grey not blue??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress bar on front NSPanel is grey not blue??


  • Subject: Re: Progress bar on front NSPanel is grey not blue??
  • From: Keary Suska <email@hidden>
  • Date: Thu, 13 Apr 2006 09:15:30 -0600

on 4/13/06 7:58 AM, email@hidden purportedly said:

> I can't make this as a separate thread. I'm porting code written for
> the PC, and the original just doesn't work that way.
>
> the useThreadedAnimation: trick didn't work unfortunatealy. I am
> doing this:
>
> [p setUsesThreadedAnimation:true];
>
> but it doesn't work! Same greyness.

I wouldn't think so. And for the record, threading is the #1 most overused
and abused techniques and should be the *last* option pursued if no other
solutions work. I doubt they would be recommended as much if Cocoa didn't
make them too easy.

That being said, the issue here may be more about how your panel is being
invoked, and this addresses both of your questions. Instead try something
like:

NSModalSession session = [NSApp beginModalSessionForWindow:progressWin];
// hot loop
for(;;) {
  // do your stuff
  // update the progress bar
  // call this for event processing
  result = [NSApp runModalSession:session];
  // you could do something with the result if you want
}
// then done
[NSApp endModalSession:session];
[progressWin close];

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

 _______________________________________________
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

  • Follow-Ups:
    • Re: Progress bar on front NSPanel is grey not blue??
      • From: Shaun Wexler <email@hidden>
References: 
 >Re: Progress bar on front NSPanel is grey not blue?? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: Progress bar on front NSPanel is grey not blue??
  • Next by Date: User Defaults Bindings confusion
  • Previous by thread: Re: Progress bar on front NSPanel is grey not blue??
  • Next by thread: Re: Progress bar on front NSPanel is grey not blue??
  • Index(es):
    • Date
    • Thread