• 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
Code reuse problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Code reuse problems


  • Subject: Code reuse problems
  • From: Phillip Ulrich <email@hidden>
  • Date: Thu, 31 Oct 2002 01:51:27 -0500

Okay. I'm having some problems getting some code of mine to work. Here's the procedure I followed as well as the errors I'm getting.

1. I have the original class. It's called BlogController. I like it enough to use it in a second app.

2. I create the second app and get to the point where I'm ready to add BlogController.

3. In Interface Builder, I create a class called BlogController. I give it all the same outlets and actions as BlogController from App #1, and connect all of the outlets to the appropriate places and appropriate buttons/menu items to the actions.

4. I tell Interface Builder to create the files for BlogController and insert them into my app. It does so.

5. I open the first version of BlogController, Command-A to select all, Command-C to copy, back to the new version of BlogController, Command-V to paste.

6. When I run App #2, I now get the following errors at runtime:
2002-10-31 01:40:26.571 EspressoBlog[4223] Unknown class `BlogController' in nib file, using `NSObject' instead.
2002-10-31 01:40:26.656 EspressoBlog[4223] Could not connect the action getBlogList: to target of class NSObject
2002-10-31 01:40:26.676 EspressoBlog[4223] Could not connect the action getCategoryList: to target of class NSObject
2002-10-31 01:40:26.677 EspressoBlog[4223] Could not connect the action post: to target of class NSObject
2002-10-31 01:40:26.677 EspressoBlog[4223] Could not connect the action postAndPublish: to target of class NSObject
2002-10-31 01:40:26.678 EspressoBlog[4223] Could not connect the action post: to target of class NSObject
2002-10-31 01:40:26.678 EspressoBlog[4223] Could not connect the action postAndPublish: to target of class NSObject
2002-10-31 01:40:26.678 EspressoBlog[4223] Could not connect the action getBlogList: to target of class NSObject
2002-10-31 01:40:26.678 EspressoBlog[4223] Could not connect the action getCategoryList: to target of class NSObject

------
I understand why the 2nd through the last lines are happening - obviously, NSObject doesn't have any of those actions. What I can't figure out is why the first line is occurring - why IB is insisting it doesn't know what this class is! I've tried rebuilding after cleaning the active target...frankly, I'm fresh out of ideas. Anyone got one?

Thanks,
Phil Ulrich
_______________________________________________
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.

  • Prev by Date: Re: Cocoa Books (was New to Cocoa)
  • Next by Date: Re: overloading operators
  • Previous by thread: Re: Problems with NSLayout addTextContainer
  • Next by thread: Re: Code reuse problems
  • Index(es):
    • Date
    • Thread