Re: NSBezierPath difficulties...
Re: NSBezierPath difficulties...
- Subject: Re: NSBezierPath difficulties...
- From: David Remahl <email@hidden>
- Date: Sat, 27 Apr 2002 08:36:15 +0200
Heh, emarrisingly enough I fell for this one as well, as late as two days
ago :).
The problem is that you need to reatain the bezier path. It is autoreleased.
/ Rgds, David
>
Hi,
>
I'm having a lot of trouble with the Obj-C class NSBezierPath.
>
>
I have a subclass of NSView, with 2 variables, NSBezierPath *b; int n;
>
in initWithFrame: I create an empty path (b = [NSBezierPath bezierPath];
>
n=0;)
>
>
in mouseDown:
>
I get the NSPoint of the event (this part works)
>
and then:
>
if(n==0) [b moveToPoint:p];
>
else [b lineToPoint:p];
>
>
the second part doesn't even matter, because the first part _always_
>
crashes with signal EXC_BAD_ACCESS (I've also tried leaving out the first
>
part, but the second part crashes then)
>
I'm able easily, however, to create ovalInRect type BezierPaths
>
also, curveToPoint: controlPoint1: controlPoint2: crashes in the same way.
>
>
If anyone can make some simple, _working_ code, or knows what I'm doing
>
wrong, please help / email me.
>
>
thanks alot,
>
Harold Cooper
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.