• 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: Odd Behaviour with CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd Behaviour with CALayer


  • Subject: Re: Odd Behaviour with CALayer
  • From: Ajay Sabhaney <email@hidden>
  • Date: Fri, 18 Jun 2010 15:01:03 -0600

Well, the problem seems to have been fixed.

I tried replacing every instance of MRWorkspaceItemLayer with a regular CALayer instance, and it seemed to work fine, meaning my problem was actually in the MRWorkspaceItemLayer subclass.  Seemed everytime I would unselect then select an item, the MRWorkspaceItemLayer would be destroyed, and then the message "expecting model layer not copy: MRWorkspaceItemLayer" would come up in the console.  So I overrided -initWithLayer: and -hitTest: , and now it seems to be fine.

Thanks for your comments

-AJ

On 2010-06-17, at 7:35 PM, Kyle Sluder wrote:

> On Thu, Jun 17, 2010 at 5:09 PM, Ajay Sabhaney <email@hidden> wrote:
>> -The initializer initWithLayer: of my subclass of CALayer, MRWorkspaceItemLayer is being invoked, even though I never explicitly invoke this
>
> The documentation for -[CALayer initWithLayer:] describes how this
> method is used to create the layers for the presentation tree.
>
>>
>> -For when I handle the mouse down event, I tried changing my code from:
>>
>> CALayer *layer = [_rootLayer hitTest: where];
>>
>> to
>>
>> CALayer *presLayer = [_rootLayer presentationLayer];
>> CALayer *layer = [presLayer hitTest: where];
>>
>> but now [[_rootLayer sublayers] indexOfObject:layer] is returning NSNotFound,but I'm still looking in to this part...
>
> Of course, if _rootLayer is a model layer, it can't contain a
> presentation layer as a sublayer.
>
> Have you tried breaking on NSLog or perhaps write, to get a backtrace
> for the specific line this message is coming from?
>
> --Kyle Sluder

_______________________________________________

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

References: 
 >Odd Behaviour with CALayer (From: Ajay Sabhaney <email@hidden>)
 >Re: Odd Behaviour with CALayer (From: David Duncan <email@hidden>)
 >Re: Odd Behaviour with CALayer (From: Ajay Sabhaney <email@hidden>)
 >Re: Odd Behaviour with CALayer (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Way to select a file in NSOpenPanel
  • Next by Date: Re: autorelease: how does this work!? (if at all)
  • Previous by thread: Re: Odd Behaviour with CALayer
  • Next by thread: Problem running CocoaDVDPlayer sample
  • Index(es):
    • Date
    • Thread