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

[NSBezierPath bezierpath]


  • Subject: [NSBezierPath bezierpath]
  • From: Pierre DOUCY <email@hidden>
  • Date: Sun, 25 Jan 2004 23:40:22 +0100

Hi all,

I'am using the NSBezierPath class quite extensively these days, and something weird happened:

if I do something like :

bp = [NSBezierPath bezierpath];
( insert lineToPoint, curveToPoint here)

in a NSView subclass' -initWithFrame (bp being an instance variable in my NSView) and

[bp fill]

in the drawInRect of the same view, everything works fine.

However, when I decide that I should initialize my NSBezierPaths elsewhere, my app dies with a SIGBUS. That's what I don't understand because I issued a [bezierpath autorelease] before returning each new instance.
After a bunch of debugging, I see that the initWithFrame works well (bp is here and I can use it), but any [bp fill] issued within the drawInRect leads to the SIGBUS.

Now, when I replace the [NSBezierPath bezierPath] with a [[NSBezierPath alloc] init] in my new function, everything is ok.

What do I miss here ? What does this [NSBezierPath bezierPath] selector actually do ? I can't see any info in the cocoa docs.


Pierre DOUCY
_______________________________________________
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.

  • Follow-Ups:
    • Re: [NSBezierPath bezierpath]
      • From: Greg Miller <email@hidden>
    • Re: [NSBezierPath bezierpath]
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Collapsing/expanding NSSplitView
  • Next by Date: Re: Swapping the contents of views
  • Previous by thread: Re: Swapping the contents of views
  • Next by thread: Re: [NSBezierPath bezierpath]
  • Index(es):
    • Date
    • Thread