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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to