Temporarily disabling notifications?
Temporarily disabling notifications?
- Subject: Temporarily disabling notifications?
- From: Joshua Scott Emmons <email@hidden>
- Date: Mon, 6 Jun 2005 20:03:31 -0400
I have a case like the following:
-(void)subviewFrameResized:(NSNotification *)notification{
[self rearrange];
}
-(void)rearrange{
[mySubview setFrameOrigin:NSMakePoint(x,y)];
}
That is to say, whenever the subview's frame is resized, I'd like to
change it's location.
The problem is that setFrameOrigin: fires the same notification as
setFrame: (NSViewFrameDidChangeNotification). Therefore whenever I
move the subview the whole process starts over again. Would the
proper thing to do be to remove notifications while I'm in my
rearrange method and register for them again at the end of it? Or am
I missing an obvious pattern that addresses this?
Cheers,
-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