• 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
Restraining window movement + gridding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restraining window movement + gridding


  • Subject: Restraining window movement + gridding
  • From: Rolf <email@hidden>
  • Date: Thu, 16 Oct 2003 01:40:35 +0200

Hi,

I need to restrain window movement in my app as follows:
- Gridding: It must only allow to have origins that are evenly divisible by X, for example 0,4,8,12, etc.
- Restrain: No sides are allowed to move outside of visible screen area.

I assume a possible solution to this is using NSWindowWillMoveNotification. However the following does not work (windowWillMove is never called), and I don't understand why:


[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowWillMove:)
name:@"NSWindowWillMoveNotification" object:self];


- (void)windowWillMove:(NSNotification *)aNotification
{
NSLog(@"windowWillMove: %@",aNotification);
}


The solution must be compatible with OS X 10.1 and up.

Anybody know how to do this ?
Thanks

/Rolf
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Restraining window movement + gridding
      • From: "Alastair J.Houghton" <email@hidden>
  • Prev by Date: Subclassing NSTableColumn
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: Subclassing NSTableColumn
  • Next by thread: Re: Restraining window movement + gridding
  • Index(es):
    • Date
    • Thread