Building a Scratch Pad with Cocoa
Subject:   NSBezier subclass for ColoredPath
Date:   2001-12-08 23:48:12
From:   psheldon
Response to: small steps on my own to three color padview

Ran off to party and perhaps let go of too much code to the thread. Maybe someone can speed read it and see what I was trying to do. Not that they should finish my assumed homework for me, but could my own structs serve as an addanobject for an NSMutableArray and how do I birth a struct other than on a stack? There isn't a NEW, is there, in objective C?
I think that a subclass could have an NSColor would inherit a constructor and not have the dot problem because I wouldn't be using a struct. Nor would I try to do something crazy like retain an address on a stack, though I don't particularly know why it is crazy, just suspect it so. I guess I would add an accessor method for the color of the ColoredPath.
I heard someone at an Apple seminar say that objects were much better than structs. He didn't formally declare why but just seemed to assure from experience. Maybe some more talk than his would make me see the trades of using structs rather than a subclass.

1 to 1 of 1
  1. NSBezier subclass creation set with no get accessor
    2001-12-09 07:06:48  psheldon [View]

    • works but with warning (short code eg.)
      2001-12-10 09:24:48  psheldon [View]

      • got rid of warning with accessor and less self
        2001-12-11 10:15:44  psheldon [View]

1 to 1 of 1