• 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
CD: subclassing NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CD: subclassing NSArrayController
      • From: mmalcolm crawford <email@hidden>
    • Re: CD: subclassing NSArrayController
      • From: Yann Bizeul <email@hidden>
  • Prev by Date: Handling hilighted row in NSTableView with bindings
  • Next by Date: Re: Replacing the view in NSTabView
  • Previous by thread: Re: Handling hilighted row in NSTableView with bindings
  • Next by thread: Re: CD: subclassing NSArrayController
  • Index(es):
    • Date
    • Thread