• 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: Keeping the User Informed during Startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping the User Informed during Startup


  • Subject: Re: Keeping the User Informed during Startup
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 28 Jan 2008 17:11:00 -0600

On Jan 28, 2008, at 1:05 PM, Steve Cronin wrote:

Folks;

I want to open a small 'splash screen' during my application's startup phase.
In my NSApp delegate's -awakeFromNib I open an NSPanel with a simple textField.
Depending on the user's configuration there maybe quite a lot of tasks to accomplish during the launch phase...
I would like to update the text with information as I proceed thru the launch process.


I have tried several approaches and they all suffer from the same issue: the textField does not always display the updated information.

I have set an outlet to the textField and bound the 'value' to a KVC compliant string.
I call the string's set method -> sometimes nothing happens
I call set and then the textfields's setNeedsDisplay -> sometimes nothing happens


I also tried binding the text field to a user default which I then updated at various times - again not always displayed...

I also tried sending the panel an -update message...

I've also tried spawning a thread for the updating of the text field - same result.

The launch process is modestly complex so it gives me pause to try and 'thread' it.
Things need to happen in a particular order, one thing following the other...
Besides busting the launch process apart or spawning it off on a thread and then implementing NSMachPorts seems like a lot of work to just get a string drawn...
Or maybe that's what really have to do....


I realize I'm creating a tension between trying to launch as quickly as possible and keeping the user informed.

Any thoughts on how I can just 'force a redraw' on this textField?

Indirectly or directly, you're marking the text field as needing display. However, normally that need is only satisfied by the main application event loop. During startup, your app is not sitting in its event loop processing window updates.


Look into the displayIfNeeded method on NSWindow and NSView.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Keeping the User Informed during Startup (From: Steve Cronin <email@hidden>)

  • Prev by Date: Drag and Drop Focus problem....
  • Next by Date: Re: Drag and Drop Focus problem....
  • Previous by thread: Keeping the User Informed during Startup
  • Next by thread: Serious problems in Interface Builder (bug?). Please help!
  • Index(es):
    • Date
    • Thread