1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Why can't I initialize my custom class?

Discussion in 'Mac Programming' started by DavidCar, Jan 24, 2007.

  1. macrumors 6502a

    #1
    In this example I posted earlier:

    "My Approach to printing NSTableView"

    http://forums.macrumors.com/showthread.php?t=273153

    I was never able to properly initialize my custom NSBox class. I used Interface Builder to declare an NSBox to belong to the custom class, and the other methods there are called correctly, but not the init or initWithFrame methods, so I had to use an inelegant way of doing it.

    Any thoughts as to what I'm doing wrong?
     
  2. Moderator emeritus

    kainjow

    #2
    Your NSBox subclass may be created via the initWithCoder: method.
     
  3. macrumors 6502a

    #3
    I just tested it, and you're correct. Problem solved.

    Thanks for the suggestion.

    DC
     

Share This Page