• 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 14:55:06 -0700

On Jun 23, 2011, at 2:40 PM, Ken Thomases wrote:

> Hi Ken,
>
> On Jun 23, 2011, at 4:12 PM, Ken Victor wrote:
>
>> so… anyone have any other ideas as to how to get called for a modifier key change will in the midst of a live resize?
>
> I'm a bit confused as to why this would be helpful?  Why is -windowWillResize:toSize: too late for your needs?  Your original message said everything was working except you couldn't get the modifier changes, but you didn't explain why that prevents you from doing what you want.


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.

>
> That said, you may be able to override -nextEventMatchingMask:untilDate:inMode:dequeue:.  Call super, examine the event that was returned to see if it is NSFlagsChanged, and then return it.  That is, your override would not reimplement or otherwise interfere with -nextEvent..., it would just monitor what it's returning.

two immediate comments though:
	in the override you suggest, i will have to “or” in the NSFlagsChangedMask to make sure i get the changes as the framework’s event loop may (i don’t know) be only looking for mouse down or mouse moved events. and
	the framework may be using -nextEventMatchingMask: instead of -nextEventMatchingMask:untilDate:inMode:dequeue:

i will experiment and report back.

thanx for the suggestion,
ken

>
> Regards,
> 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: constrained window resizing
      • From: Quincey Morris <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>)

  • Prev by Date: Re: tableView: objectValueForTableColumn: row: method not getting called
  • Next by Date: Re: constrained window resizing
  • Previous by thread: Re: constrained window resizing
  • Next by thread: Re: constrained window resizing
  • Index(es):
    • Date
    • Thread