• 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: NSBezierPath difficulties...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: C'mon Apple! DECIDE!
  • Next by Date: UDP Broadcasts
  • Previous by thread: NSBezierPath difficulties...
  • Next by thread: C'mon Apple! DECIDE!
  • Index(es):
    • Date
    • Thread