On 2 Apr 2010, at 22:21, Klaus Backert wrote:
Hi, Dave
There are some typing errors in this code, I think, but anyway,
this might be a case of lazy creation of an object inside a getter
of another object. You will find the same e.g. in Apple's code
examples about OpenGL, where the
On 6 Apr 2010, at 16:19, Dave wrote:
Also as far as I can see, there are a couple of draw-backs to doing
it this way. In the example:
-(ClassY*) mClassY
{
if (mClassY == nil)
{
mClassY = [[ClassY alloc] initWithData:someData]:
}
return mClassY;
}
The reasons I don't
Hi All,
I came across this code and was wondering if this is normal practice
and/or considered good coding style.
Given two classes ClassX and ClassY:
@interface ClassX
{
ClassY mClassY;
}
@property (nonatomic,retain,readonly) ClassY* mClassY
@end
@interface ClassY
{
On Apr 2, 2010, at 13:48, Dave wrote:
Is this normal? Looking at the code it seems hard to see what is going on,
Surely it would be better practice to have an init method that does this? e.g.
self.mClassY = [[alloc] initWithData: initWithData:someData]
It's perfectly normal for a class to
Hi, Dave
On 2 Apr 2010, at 22:48, Dave wrote:
Hi All,
I came across this code and was wondering if this is normal practice
and/or considered good coding style.
Given two classes ClassX and ClassY:
@interface ClassX
{
ClassY mClassY;
}
@property (nonatomic,retain,readonly)