• 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: Servicing Core Animations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Servicing Core Animations?


  • Subject: Re: Servicing Core Animations?
  • From: Bill Dudney <email@hidden>
  • Date: Mon, 14 Jul 2008 12:52:50 -0600

Hi Chilton,

The animator does not commit its transaction until back in the event loop so you won't see any animation until you return to the main event loop.

You can of course override this but in the example below you are doing the animation yourself so there is no reason for CA. i.e. tracking mouse movements is not something you want to do with CA animations anyway.

HTH,

-bd-
http://bill.dudney.net/roller/objc

On Jul 12, 2008, at 4:54 PM, Chilton Webb wrote:

Hi Professor Savant,

Confirmation that it should work was what I was after, so after reading your email, I decided to write up a test app, and it happens there, too. This is the problem distilled to its simplest form. I welcome any feedback, mockery, etc.

If I use the option in (1) below, it works fine. If I use the option in (2), which is what I WANT to use, no animation occurs until after the mouseup happens.

-Chilton

- (void) mouseDown: (NSEvent *) theEvent
{
while (1) {

theEvent = [[self window] nextEventMatchingMask: (NSAnyEventMask)];
if (([theEvent type]==NSLeftMouseDragged) ||
([theEvent type]==NSLeftMouseUp) ||
([theEvent type]==NSLeftMouseDown))
{


			// (1) If I use this, it works fine. No zooom zooom though.
			//[button setFrameOrigin:[theEvent locationInWindow]];

			// (2) If I use this, it doesn't work.
			//[[button animator] setFrameOrigin:[theEvent locationInWindow]];

			if ([theEvent type]==NSLeftMouseUp) {
				break;
			}
		}

	}

}


_______________________________________________

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

_______________________________________________

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: Servicing Core Animations?
      • From: Jens Alfke <email@hidden>
References: 
 >Servicing Core Animations? (From: Chilton Webb <email@hidden>)
 >Re: Servicing Core Animations? (From: "I. Savant" <email@hidden>)
 >Re: Servicing Core Animations? (From: Chilton Webb <email@hidden>)

  • Prev by Date: Re: Remove overlap on NSBezierPath
  • Next by Date: Trouble with performSelector afterDelay
  • Previous by thread: Re: Servicing Core Animations?
  • Next by thread: Re: Servicing Core Animations?
  • Index(es):
    • Date
    • Thread