Hi,
I have the following code:
- (void)drawRect:(NSRect)dirtyRect
{
[[NSBezierPath bezierPathWithOvalInRect:[self theRect]] stroke];
}
- (NSRect)theRect
{
return NSMakeRect(1, 1, 1, 1); // made up some values
}
When I compile it says "Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error". When I do this, however, it works:
- (void)drawRect:(NSRect)dirtyRect
{
NSRect theRect = NSMakeRect(1, 1, 1, 1);
[[NSBezierPath bezierPathWithOvalInRect:theRect] stroke];
}
What is problem?
Thanks.