Women in Technology

Hear us Roar



Article:
  Building a Scratch Pad with Cocoa
Subject:   warning: cannot find class (factory) method.
Date:   2001-12-01 09:52:39
From:   larryvp
I get the following 2 errors:


warning: cannot find class (factory) method.
warning: return type for 'path' defaults to id


for the following line in the initWithFrame method:


path = [[NSBezierPath path] retain];


I tried to download the source project to see what I did wrong but when stuffit trys to uncompress it I get an error that says:


The file "ScratchPad.sit" does not appear to be compressed or encoded. It is advised that you obtain further information about the contents of this file from the sender or provider of the file.


I've tried repeatedly but still get the same error.


Many thanks for any suggestions!


Thanks for a great column!

Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • warning: cannot find class (factory) method.
    2001-12-01 23:04:41  thee_ice [View]

    I found that if you replaced it with

    path = [[NSBezierPath bezierPath] retain];

    that it works fine, hope that helps.
    • That did the trick! Thanks!
      2001-12-02 09:07:04  larryvp [View]

      That did the trick! Thanks!
      • Michael Beam photo That did the trick! Thanks!
        2001-12-02 10:21:56  Michael Beam | O'Reilly Author [View]

        That's right, it should be bezierPath, not path. It will get corrected on monday. Hope you enjoy the article!

        Mike
        • That did the trick! Thanks!
          2001-12-02 15:08:24  thee_ice [View]

          The article was fine, I thought it was going to deal with OpenGL, which I'm doing now, it's a lot harder to learn then this is.
          Keep up the good work Mike, and Congratulations on Graduating.