• 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
instance fails in its own class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

instance fails in its own class


  • Subject: instance fails in its own class
  • From: N!K <email@hidden>
  • Date: Sat, 6 Nov 2010 22:44:02 -0700

This should be an elementary step, just like in  all the examples I've seen, but it doesn't work for me.
I'm trying to create an instance of a class, which I can use to access -methods.

Class *obj = [Class new];
 works OK in ProjectAppDelegate.m.



However, exactly the same statement fails when pasted into -init of Class.m.

Build yields "warnings  Class may not respond to -new."  I have not created any -new, and NSObject shows +new.
It doesn't matter if the  Class * declaration is in the .h files instead of .m files.

It runs but does nothing. A break point is reached in ProjectAppDelegate.m, but none is reached in Class.m

I'm using Xcode 3.2.4, which has GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010).
On the chance that Xcode was corrupted, I deleted and installed it again. No improvement.

I couldn't find any leads in Google. Any idea what's going on?

Thanks,

Nick


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Understanding the Run loop idea and the updating of controls during long operations
  • Next by Date: Re: instance fails in its own class
  • Previous by thread: Re: Understanding the Run loop idea and the updating of controls during long operations
  • Next by thread: Re: instance fails in its own class
  • Index(es):
    • Date
    • Thread