What is Object Class Name used for in bindings?

  • I'm learning about bindings. Now if I'm using a NSArrayController I understand that the “Object Class Name" tells the array controller what sort of objects are contained inside of the array that it controls”. But if I'm using NSObjectController it seems that “Object Class Name" is of no use. Is this correct?

    Bob



    ____________________________________________________________________________________
    Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
    http://farechase.yahoo.com/
  • on 10/6/07 1:33 AM, <bobueland...> purportedly said:

    > I'm learning about bindings. Now if I'm using a NSArrayController I understand
    > that the ³Object Class Name" tells the array controller what sort of objects
    > are contained inside of the array that it controls². But if I'm using
    > NSObjectController it seems that ³Object Class Name" is of no use. Is this
    > correct?

    Both assumptions are technically incorrect. Look in the API docs--which
    class defines and implements -objectClass? What is it for?

    Best,

    Keary Suska
    Esoteritech, Inc.
    "Demystifying technology for your home or business"
  • Keary Suska wrote:
    Look in the API docs--which class defines and implements -objectClass? What is it for?

    Thanks for the reply Keary. I've looked up the -objectClass method in API. It's NSObjectController class that implements it. What it is used for is harder to tell, but it seems (new assumptions) that we have two cases:

    Case one:  NSObjectController does not have its content outlet pointing at any object. In this case it keeps its own object (it owns the object), and the 'Object Class Name' (in IB) tells what kind of object it is. In IB there is also a check box called 'Automatically prepares content' which can be used for automatically creating the object in question.

    Case two:  NSObjectController
    has its content outlet pointing at some object, for instance MyDocument. In this case it seems that 'Object Class Name' (in IB) is of no use. Since in that case it's the MyDocument that owns the object in question.

    Is this also incorrect?

          ____________________________________________________________________________________
    Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
  • On Oct 7, 2007, at 1:26 AM, Bob Ueland wrote:

    > Keary Suska wrote:
    > Look in the API docs--which class defines and implements -
    > objectClass? What is it for?
    > Thanks for the reply Keary. I've looked up the -objectClass method
    > in API. It's NSObjectController class that implements it. What it is
    > used for is harder to tell,
    >
    As the documentation states, see also newObject.

    mmalc
  • Let me rephrase the question. If NSObjectController has a content object (for instance MyDocument), is there any use for 'Object Class Name'?

    mmalc wrote
    As the documentation states, see also newObject.

          ____________________________________________________________________________________
    Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
    http://tv.yahoo.com/collections/3658
  • At 8:02 AM -0700 10/7/07, mmalc crawford wrote:
    > On Oct 7, 2007, at 1:26 AM, Bob Ueland wrote:
    >
    >> Keary Suska wrote:
    >> Look in the API docs--which class defines and implements
    >> -objectClass? What is it for?
    >> Thanks for the reply Keary. I've looked up the -objectClass method
    >> in API. It's NSObjectController class that implements it. What it
    >> is used for is harder to tell,
    >>
    > As the documentation states, see also newObject.

    There are useful comments in the NSObjectController Class Reference
    Overview.  The Object Class Name specifies the content object the
    controller will manage for view classes that want access to the
    content object.  The name is used by the controller to invoke the
    key-value methods for the content object.  In the case of a
    NSArrayController, the Object Class Name specifies the kind of
    objects in the array the controller manages.

    There is more to this than these brief comments, but this should help
    set you on the path to understanding. :-)
    --

    john noerenberg
      ----------------------------------------------------------------------
      The Constitution of the United States is a law for rulers and people
      equally in war and in peace, and covers with the shield of its
      protection all classes of men, at all times, and under all
      circumstances.
      -- U.S. Supreme Court, Ex Parte Milligan, 71 U.S. 2, 120-121 (1866)
      ----------------------------------------------------------------------
previous month october 2007 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