• 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: constrained window resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: constrained window resizing


  • Subject: Re: constrained window resizing
  • From: Ken Victor <email@hidden>
  • Date: Thu, 23 Jun 2011 15:57:58 -0700

empirically, it appears that the event tracking loop for window resizing is calling
	-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
so i can’t simply override NSWindow’s matching method in my subclass. thus, while overriding NSApplication’s method is probably doable, i believe it would be “messier” than quincey’s "low tech" solution, which can be encapsulated in my subclass. i will now give this a try and report back.

thanx quincey,
ken


On Jun 23, 2011, at 3:21 PM, Quincey Morris wrote:

> On Jun 23, 2011, at 14:55, Ken Victor wrote:
>
>> lets say the user had been resizing the window without any modifier keys pressed, but then realized what s/he really wanted was to resize in only one dimension or to maintain the window’s aspect ratio, so now s/he presses either shift or shift and control. i would like to be able to resize the window at this time to show the proper effect, but i can’t do this until the user moves the mouse AFTER changing the modifier keys.
>
> Don't overlook the possibility of a low tech solution. How about starting a repeating timer with an interval of (say) 0.1 secs, and checking the flags when the time fires? You'd probably want to "debounce" the timer by preventing it from triggering another resize when resizing is already in progress, and possibly for a short time afterwards.
>
>

_______________________________________________

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: constrained window resizing
      • From: Ken Victor <email@hidden>
References: 
 >Re: Cocoa-dev Digest, Vol 8, Issue 462 (From: Ken Victor <email@hidden>)
 >Re: constrained window resizing (From: Ken Thomases <email@hidden>)
 >Re: constrained window resizing (From: Ken Victor <email@hidden>)
 >Re: constrained window resizing (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Dragging from an NSBrowser to an NSTableView
  • Next by Date: Add KVO for observing center property from a UIImageView
  • Previous by thread: Re: constrained window resizing
  • Next by thread: Re: constrained window resizing
  • Index(es):
    • Date
    • Thread