Re: Using bindings across frameworks
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