Hi all,

How does one programmatically create an NSObjectController in Entity
mode?  I've tried all kinds of orderings of calls but can't get it do work.

1) the docs don't say what the designated initializer is.  Is it
initWithContent?  What should be passed as 'content'?  Is nil acceptable?

2) I've tried:

        myController = [[NSObjectController alloc] initWithContent:nil];
        [myController setManagedObjectContext:[self managedObjectContext]];
        [myController setEntityName:@"MyEntity"];
        [myController setAutomaticallyPreparesContent:YES];

But when I do 'po' in gdb it reveals that it's in Object mode:

(gdb) po myController
<NSObjectController: 0x3a895a0>[object class: NSMutableDictionary]

An archive post suggests this is a bug in NSObjectController's
description, but I can't be sure.  In any case, [myController content]
always gives nil.

What is the correct way to programmatically creates these things?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 [EMAIL PROTECTED]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to