Re: Yet another CALayer puzzle
That did the trick! Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: Yet another CALayer puzzle
You need to override -initWithCoder: in addition to -initWithFrame:. NSView has two designated initializers. -Ken On Wed, Oct 22, 2008 at 9:48 AM, DKJ <[EMAIL PROTECTED]> wrote: > I've got myView and myController objects in my nib file. myView is an > IBOutlet of myController. I put this in the initWithFrame: method of myView: > >CALayer *rootLayer = [CALayer layer]; >[self setLayer:rootLayer]; >[self setWantsLayer:YES]; > > But when I read myView's wantsLayer in the awakeFromNib method of > myController, I find its value is 0. How did the value get changed? > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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/kenferry%40gmail.com > > This email sent to [EMAIL PROTECTED] > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: Yet another CALayer puzzle
On Oct 22, 2008, at 9:48 AM, DKJ wrote: I've got myView and myController objects in my nib file. myView is an IBOutlet of myController. I put this in the initWithFrame: method of myView: CALayer *rootLayer = [CALayer layer]; [self setLayer:rootLayer]; [self setWantsLayer:YES]; But when I read myView's wantsLayer in the awakeFromNib method of myController, I find its value is 0. How did the value get changed? Your nib probably has setWantsLayer turned off. What ever is in your nib is what will be true by the time awakeFromNib is called. Simplest solution is to move this setup into -awakeFromNib. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Yet another CALayer puzzle
I've got myView and myController objects in my nib file. myView is an IBOutlet of myController. I put this in the initWithFrame: method of myView: CALayer *rootLayer = [CALayer layer]; [self setLayer:rootLayer]; [self setWantsLayer:YES]; But when I read myView's wantsLayer in the awakeFromNib method of myController, I find its value is 0. How did the value get changed? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]