• 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
Race condition with awakeFromNib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Race condition with awakeFromNib?


  • Subject: Race condition with awakeFromNib?
  • From: David Carlisle <email@hidden>
  • Date: Wed, 18 Jun 2008 11:04:13 -0600

I have a navigator object which maintains a stack of NSViewControllers. When I create a new NSViewController and push it to the navigator, I want the view's back button to show the name of the previous view. If the navigator tries to set the title of the button, the button is still null because it has not yet awoke from the nib. The navigator can pass the previous view to the new view so that when the new view does an awakeFromNib, it can get the title of the previous view and set its back button accordingly. This works, but I'm concerned that if awakeFromNib is being done in a separate thread then I have a race condition between awakeFromNib and the navigator setting the previous view. Though it works now, might it break with a multicore computer?
_______________________________________________


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


  • Follow-Ups:
    • Re: Race condition with awakeFromNib?
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: disappearing NSSpellingStateAttributeName
  • Next by Date: Swapping splitview subviews
  • Previous by thread: Re: disappearing NSSpellingStateAttributeName
  • Next by thread: Re: Race condition with awakeFromNib?
  • Index(es):
    • Date
    • Thread