• 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
CoreAnimation in a modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreAnimation in a modal window


  • Subject: CoreAnimation in a modal window
  • From: Pierre Bernard <email@hidden>
  • Date: Thu, 10 Apr 2008 17:33:51 +0200

Hi!

I am trying to do some nice drawing using CoreAnimation. It all works fine, except for a long series of "CoreAnimation: rendering error 500" messages.

However, as soon as I try to use my window in the context of a modal session, only the background is draw. The actual animated layers are missing.

What am I doing wrong?

- (NSUInteger)beginModalWindow:(NSWindow *)modalWindow
{
	NSModalSession currentModalWindowSession;

if ([[modalWindow delegate] respondsToSelector:@selector(windowWillBeginModal:)]) {
[[modalWindow delegate] windowWillBeginModal:modalWindow];
}

[modalWindow makeKeyAndOrderFront:self];


if ([[modalWindow delegate] respondsToSelector:@selector(windowDidBeginModal:)]) {
[[modalWindow delegate] windowDidBeginModal:modalWindow];
}

currentModalWindowSession = [NSApp beginModalSessionForWindow:modalWindow];


NSUInteger result = NSOKButton;

while(1) {
NSInteger response = [NSApp runModalSession:currentModalWindowSession];

if (response == NSRunAbortedResponse) {
result = NSCancelButton;
}

if (response != NSRunContinuesResponse) {
break;
}
}

[NSApp endModalSession:currentModalWindowSession];

if ([[modalWindow delegate] respondsToSelector:@selector(windowWillEndModal:)]) {
[[modalWindow delegate] windowWillEndModal:modalWindow];
}

[modalWindow orderOut:self];

if ([[modalWindow delegate] respondsToSelector:@selector(windowDidEndModal:)]) {
[[modalWindow delegate] windowDidEndModal:modalWindow];
}

return result;
}


Best,
Pierre Bernard

---
Pierre Bernard
http://www.bernard-web.com/pierre
http://www.houdah.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: CoreAnimation in a modal window
      • From: Pierre Bernard <email@hidden>
    • Re: CoreAnimation in a modal window
      • From: Dimitri Bouniol <email@hidden>
  • Prev by Date: starter application
  • Next by Date: Re: starter application
  • Previous by thread: Re: starter application
  • Next by thread: Re: CoreAnimation in a modal window
  • Index(es):
    • Date
    • Thread