Race condition with awakeFromNib?
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