• 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
Temporarily disabling notifications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Temporarily disabling notifications?
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: OSX Version
  • Next by Date: Re: Accepting image drags from Safari & Firefox
  • Previous by thread: Re: osX86 and frameworks
  • Next by thread: Re: Temporarily disabling notifications?
  • Index(es):
    • Date
    • Thread