• 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
Re: A finished moving notification for a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A finished moving notification for a window?


  • Subject: Re: A finished moving notification for a window?
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 6 Nov 2008 13:50:28 -0800

At 4:35 PM -0500 11/6/08, Eric Gorr wrote:
On Nov 6, 2008, at 3:29 PM, email@hidden wrote:

At 12:02 PM -0800 11/6/08, ic wrote:
Date: Thu, 6 Nov 2008 14:20:08 -0500
From: Eric Gorr <email@hidden>
Subject: Re: A finished moving notification for a window?
To: Cocoa Dev <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Nov 6, 2008, at 1:52 PM, Eric Gorr wrote:

It looks like the only way to get the behavior I want is to subclass NSWindow and override the mouse movement functions for the NSResponder.

Well, this just got a little more complicated.

The window does not mouseDown or mouseUp events if the user clicks in the title bar.

I found an old thread:

http://lists.apple.com/archives/cocoa-dev/2006/Oct/msg00141.html

related to this issue, but there was no solution posted to the mailing list.

i manage this with a subclass of nswindow as follows: register to receive the NSWindowWillMoveNotification notification upon receiving this notification, set an iVar windowIsMoving override send event as follows:


How, exactly, did you do this?

I have tried a couple of different things, but nothing seems to be working. If it matters (and I don't see why it should), I actually have a NSPanel.

In my delegate for the NSPanel, as a test, I tried defining:

- (void)windowWillMove:(NSNotification *)notification
{
  NSLog( @"windowWillMove" );
}

but this never gets called. I also defined windowDidMove and that gets called without any trouble. Any idea why windowWillMove would not get called?



Next, in the awakeFromNib method in my controller, I tried calling:

[[NSNotificationCenter defaultCenter] addObserver:myWindow selector:@selector(paletteWindowWillMove:) name:NSWindowWillMoveNotification object:nil];

but, the selector paletteWindowWillMove: in the subclass of my NSPanel, never gets called. Any idea why?

from my NSWindow subclass's awakeFromNib:

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

i have no idea if this will work with panel's, but i would think it would as a panel is a subclass of a window, but you would obviously have to subclass NSPanel instead of NSWindow.

ken

_______________________________________________

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


  • Follow-Ups:
    • Re: A finished moving notification for a window?
      • From: Eric Gorr <email@hidden>
References: 
 >Re: Cocoa-dev Digest, Vol 5, Issue 1904 (From: "email@hidden" <email@hidden>)

  • Prev by Date: IKImageBrowserView scrolling with core animation
  • Next by Date: Re: image in CoreData
  • Previous by thread: Re: Cocoa-dev Digest, Vol 5, Issue 1904
  • Next by thread: Re: A finished moving notification for a window?
  • Index(es):
    • Date
    • Thread