• 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: Request for help in getting table View to reflect fetch results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for help in getting table View to reflect fetch results


  • Subject: Re: Request for help in getting table View to reflect fetch results
  • From: "I. Savant" <email@hidden>
  • Date: Sun, 15 Jul 2007 18:10:12 -0400

On Jul 15, 2007, at 5:11 PM, Ernest Schaal wrote:
You all have given me a lot to study over the next few days. If I
understand you correctly, it is doable, but it is a nontrivial
exercise.

With respect, you're trying to run before you can walk. Get yourself a good book on Cocoa (most of which, I believe, cover using table views the "original" way - with table data sources). This is so not-non-trivial it isn't not not even funny. You NEED to learn the basics before you try writing an app that uses the more advanced topics (Bindings and Core Data).

It appears that the present Mac documentation makes it easy for the
novice to get started in developing a data base, and you can easily
make a quick-and-dirty one on the fly, but such a database lacks many
features (like fetch requests that modify the table view). To do more,
you really have to know the code well enough to make you own
controllers from scratch rather than use the ones made by the
control-drag from the model to the interface window.

It depends on what you're doing. Since you haven't yet thoroughly read the documentation you've been directed to, you can't really make such an assertion.

Creating an interface from the model using the control-drag shortcut is mostly only useful as a 'scaffolding' so you can manipulate things while you're developing your application into something more complicated. If you're expecting to build a full- featured, useful application with drag-and-drop, you'd do well to reevaluate your expectations; they're unrealistic. Control-dragging an interface from a data model will get you a very basic beginner's address book app and little more without tweaking.

Remember, scaffolding is ugly, bare-bones, and a *temporary* measure during construction.


- NSTableDataSource Protocol Objective-C Reference
- Table View Programming Guide

That's a good place to start if you don't want to use Cocoa Bindings (which newbies often believe is part of Core Data; it's not, it just meshes well with it). It'll show you how things work without Bindings, which is *essential* if you want to be anything more than a dilettante. I mean that with respect; it sounds like you want to learn more, so it's important to understand that Core Data and Cocoa Bindings are not really 'beginner' materials. If you want to make good use of them, you have to learn more about Cocoa itself first.


If you want to use bindings (which negates the need for code for simply displaying/editing most data in a table view), I suggest this tutorial:

http://www.cocoadevcentral.com/articles/000080.php

This shows you not only how to supply data to a table via Bindings, but how Bindings generally work. This is done with a real- world example (a basic mail app interface). Using bindings, you don't have to use the table data source for the basics, but you may have to use a mix of the two for some things (custom cells, etc.).

In short, however, you truly are biting off more than you can chew at the moment. It appears you're trying to swallow the entire rack of ribs whole, as opposed to chewing the meat off one rib at a time. Slow down, chew, and use some barbecue sauce. ;-)

--
I.S.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Request for help in getting table View to reflect fetch results
      • From: "Ernest Schaal" <email@hidden>
References: 
 >Request for help in getting table View to reflect fetch results (From: "Ernest Schaal" <email@hidden>)
 >Re: Request for help in getting table View to reflect fetch results (From: Chris Hanson <email@hidden>)
 >Re: Request for help in getting table View to reflect fetch results (From: mmalc crawford <email@hidden>)
 >Re: Request for help in getting table View to reflect fetch results (From: "Ernest Schaal" <email@hidden>)

  • Prev by Date: 'real' auto wrap in NSTextView
  • Next by Date: Re: Request for help in getting table View to reflect fetch results
  • Previous by thread: Re: Request for help in getting table View to reflect fetch results
  • Next by thread: Re: Request for help in getting table View to reflect fetch results
  • Index(es):
    • Date
    • Thread