• 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
Re: Using bindings across frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using bindings across frameworks


  • Subject: Re: Using bindings across frameworks
  • From: mmalcolm crawford <email@hidden>
  • Date: Sat, 18 Dec 2004 20:47:43 -0800


On Dec 18, 2004, at 7:55 PM, Bob Peterson wrote:

Is it possible to use bindings across frameworks? I get an error:
2004-12-17 19:51:57.453 MyApp[1667] Cannot find object class with name MyItem
It happens when I send an add: action to my NSArrayController. The controller is declared to contain items of type MyItem. The key path winds its way through three model objects: a MyManager, a MyItemList controlled by the NSArrayController, and its MyItems. The MyItemList and MyItem classes are in a separate framework from the main application.
When I build the app as a single target (everything built into a single executable, no separate framework), it works. What am I doing wrong?


When you use the separate framework, can you create a new instance of MyItem directly using alloc/init?

If so, the controller may be only looking for the class in the application's main bundle? You could try subclassing NSArrayController and overriding -newObject:

- newObject
{
	id newObject = [[MyItem alloc] init];
	// custom initialisation if required
	return newObject;
}


mmalc _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Using bindings across frameworks
      • From: Bob Peterson <email@hidden>
References: 
 >Using bindings across frameworks (From: Bob Peterson <email@hidden>)

  • Prev by Date: Using bindings across frameworks
  • Next by Date: Re: Key-value coding and dictionaries (was Re: Weird behavior in NSMutableDictionary)
  • Previous by thread: Using bindings across frameworks
  • Next by thread: Re: Using bindings across frameworks
  • Index(es):
    • Date
    • Thread