running code when all notifications have been processed?
running code when all notifications have been processed?
- Subject: running code when all notifications have been processed?
- From: Joshua Scott Emmons <email@hidden>
- Date: Fri, 17 Feb 2006 16:29:44 -0600
I have a view that contains a variable number of smaller subviews.
These subviews all change their size and appearance in response to a
notification that is posted by my model. After the subviews have all
updated themselves, their superview needs to arrange them. Right now
I have something like the following in the subview:
-(void)modelChanged:(NSNotification *)notification{
//do stuff
[superview arrangeMySubviews];
}
This works, but has the obvious disadvantage that it calls the
superview's arrangeMySubviews once for EACH subview that processes
this notification. What should really happen is that
arrangeMySubviews should be called only once after all the subviews
have received and processed their notifications. Is there a way to be
notified when all the objects sent a notification have processed it?
Or is there a mechanism that will let me queue up many duplicate
selectors, only sending the final message once?
Many thanks,
-Joshua Emmons
_______________________________________________
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