Re: CALayer, CATextLayer, and inheritance . . .

2009-01-11 Thread Scott Anguish
On 11-Jan-09, at 1:24 PM, Gordon Apple wrote: Well, it's good to know that. One thing I had assumed (possibly erroneously) is that other initializers and factory methods would internally call init for basic initialization. You can't assume that. That's where the designated initializer

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-11 Thread Michael A. Crawford
Thanks for that, Scott. Due to your input, I found the problem. It turns out [super init] was not being called for CATextLayer. Here is my hierarchy: NSObject<-CALayer<-CATextLayer<-NDInfoLayer<-SpeedInfoLayer NDInfoLayer contains common attributes and behavior (NSFont(s), NSMutableAttr

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-11 Thread Gordon Apple
Well, it's good to know that. One thing I had assumed (possibly erroneously) is that other initializers and factory methods would internally call init for basic initialization. That would be consistent with your claim that factory methods are just convenience methods. I found out that's not

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-10 Thread Scott Anguish
On 10-Jan-09, at 7:26 PM, Michael A. Crawford wrote: I know that the documentation states the CALayer entities are to be allocated with class methods: CALayer* l = [CALayer layer]; CATextLayer* tl = [CATextLayer layer]; Am I creating a problem by not allocating and initializing my layers

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-10 Thread Gordon Apple
I would definitely recommend using the factory methods. You have no idea of what is going on inside those methods, but you better believe you need it, whatever it is. Also, I've found that some of those methods don't even cal init, which I found out when my own iVars were not getting initiali

CALayer, CATextLayer, and inheritance . . .

2009-01-10 Thread Michael A. Crawford
Ok, I think I'm hosed but I need one of you bright people to tell me just how bad it is. I'm working on a avionics simulation project that leverages Core Animation and layers in order to composite various elements of the display. These elements all have various behaviors and attributes b