[SOLVED] Re: Custom window resizer: flicker
[SOLVED] Re: Custom window resizer: flicker
- Subject: [SOLVED] Re: Custom window resizer: flicker
- From: Claudio Procida <email@hidden>
- Date: Fri, 24 Nov 2006 16:38:15 +0100
Il giorno 24 nov 2006, alle ore 15:11, Claudio Procida ha scritto:
startPoint = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
while (keepOn) {
theEvent = [parent nextEventMatchingMask: NSLeftMouseUpMask |
NSLeftMouseDraggedMask];
currentPoint = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
Somehow the coordinates passed by the events where not actualized. I
solved the issue using the class method:
startPoint = [NSEvent mouseLocation];
while (keepOn) {
theEvent = [parent nextEventMatchingMask: NSLeftMouseUpMask |
NSLeftMouseDraggedMask];
currentPoint = [NSEvent mouseLocation];
Also, there was no need to translate the points as I'm interested in
their distance, which is an invariant.
I have to prevent the window from resizing below min size and above
max size, but that's easy stuff :)
--
Claudio Procida
Emeraldion Lodge
http://www.emeraldion.it
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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