CD: subclassing NSArrayController
CD: subclassing NSArrayController
- Subject: CD: subclassing NSArrayController
- From: Jesus De Meyer <email@hidden>
- Date: Mon, 26 Sep 2005 17:22:24 +0200
Hi again,
I think I'm getting the hang of CoreData, but I'm still strugling
over something.
In my app, what I'd like to do is have a tableview that lists all the
objects that I have added. But instead of having a Master Interface,
I would like to have 2 buttons, add and remove. When I would click on
the add button, I would get a sheet with things I can fill in and
when I close the sheet, by clicking save or something, this object
should get added to the tableview.
What's the best way to do this? I was thinking of subclassing the
NSArrayController that represents my objects and override the add
method to show up a sheet. When I then click on save, I then call
[NSEntityDescription
insertNewObjectForEntityForName:inManagedObjectContext:context],
setup the values of the object to the ones from the TextFields and
other elements and close the sheet.
Is that a good method or is there another solution?
Also, I noticed that relationship show up as popupmenu in the
TableView. I don't want that, instead I would like to display what is
selected, without the popupmenu. I tried removing the data cell, but
that didn't work too well.
Thanks in advance,
Jesus
_______________________________________________
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