An Excursus

  • This is tangentially related to my previous message about
    NSSearchField and Apple's Core Data Tutorial, but it concerns my
    learning experience with Cocoa more than being directly relevant to
    that thread.

    In talking off-list with another list member, he mentioned that I
    needed to bind the Selection Indexes and Sort Descriptors of one of my
    NSTableViews to the same for the controller for that table view, in
    this case MessagesController. That's fine and I appreciate the tip.
    (I'm not entirely sure I understand why, but at least I know I need to
    investigate this aspect of bindings more.)

    What I find frustrating is that when I have a problem with Cocoa, it
    seems to frequently be because there was something I was supposed to
    do that was not mentioned in whatever tutorial I'm working with,
    whether online (including from Apple!) or in my text (Hillegass, 2ed).
    Is there some way that I should have known to bind up the Selection
    Indexes and Sort Descriptors? These kinds of "you're supposed to..."
    things are frustrating and make learning Cocoa seem more like a linear
    progression than a geometric one for me.

    If anyone can offer tips about how to overcome this aspect of my
    experience I would greatly appreciate it.

    Thanks as always,
    Jamie
  • > In talking off-list with another list member, he mentioned that I
    > needed to bind the Selection Indexes and Sort Descriptors of one of
    > my NSTableViews to the same for the controller for that table view,
    > in this case MessagesController. That's fine and I appreciate the
    > tip. (I'm not entirely sure I understand why, but at least I know I
    > need to investigate this aspect of bindings more.)

      I'm not sure why you would expect a tutorial on Core Data to
    explain the use of table views, sort descriptors, and the like. Cocoa
    is a huge API with a lot of beginner-to-intermediate-to-advanced
    technologies. Examples:

    NSTableView & Sort Descriptors: beginner
    Cocoa Bindings & Core Data: advanced

      Given that distinction, is it any wonder that a tutorial on an
    advanced part of the API casually references beginner-level topics
    without explaining it? More importantly, if you were already fully
    versed on sort descriptors, would it not be frustrating, time-
    consuming, and annoying to have to fish through those details in every
    article that makes use of them?

    > If anyone can offer tips about how to overcome this aspect of my
    > experience I would greatly appreciate it.

      If you want advice for overcoming your problem, the only advice
    anyone can really give is to widen your scope and read more of the
    documentation.

      For what it's worth, this is specific to Cocoa. I've run into this
    "problem" (interdependent concepts) in every language / API /
    complicated technology. It takes research, for which there is no
    substitute.

    --
    I.S.
  • On Mar 4, 2008, at 12:47 PM, Jamie Phelps wrote:

    > In talking off-list with another list member, he mentioned that I
    > needed to bind the Selection Indexes and Sort Descriptors of one of
    > my NSTableViews to the same for the controller for that table view,
    > in this case MessagesController. That's fine and I appreciate the
    > tip. (I'm not entirely sure I understand why, but at least I know I
    > need to investigate this aspect of bindings more.)
    > What I find frustrating is that when I have a problem with Cocoa, it
    > seems to frequently be because there was something I was supposed to
    > do that was not mentioned in whatever tutorial I'm working with,
    > whether online (including from Apple!) or in my text (Hillegass,
    > 2ed). Is there some way that I should have known to bind up the
    > Selection Indexes and Sort Descriptors? These kinds of "you're
    > supposed to..." things are frustrating and make learning Cocoa seem
    > more like a linear progression than a geometric one for me.
    >
    If you find missed steps in the tutorials, please file bugs.

    That said, the search field bindings etc. would normally be set up
    correctly for you if you create your interface using the "Entity
    Wizard".  The content, selection indexes and sort descriptors bindings
    should normally be set up for you automatically when you bind a table
    column (see <http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/B
    indingsText/NSTableView.html
    >).  If they're not bound, it's typically because you've done
    something to unbind them.

    Along the lines of a previous reply, though, if you want to follow a
    Core Data tutorial I would make the following recommendations:
    (a) Per the documentation, learn Cocoa Bindings *or* Core Data first.
    Learning both simultaneously is generally counter-productive.
    (b) When learning Core Data, start with the Low Level tutorial (<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreDataUtilityTu
    torial/00_Introduction/chapter_1_section_1.html
    >).
    (c) Follow the NSPersistentDocument Core Data Tutorial (<http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocum
    entTutorial/00_Introduction/chapter_1_section_1.html
    >) instead of the video-based one since it provides complete source
    code.

    mmalc
previous month march 2008 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today