• 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: undocumented "NSNibOwning" informal protocol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undocumented "NSNibOwning" informal protocol?


  • Subject: Re: undocumented "NSNibOwning" informal protocol?
  • From: Jérôme Laurens <email@hidden>
  • Date: Fri, 8 Nov 2002 16:16:31 +0100

Le vendredi, 8 nov 2002, ` 13:53 Europe/Zurich, Clark S. Cox III a
icrit :

> [...]

> any object can be the owner of a nib file (used in
> -[NSWindowController init... owner: object])
>> apparently, the owner can implement as NSDocument does
>>
>> windowControllerWill/DidLoadNib:
>>
>> I suspect [NSWindowController windowWill/DidLoad] asks the owner for
>> such a message despite the doc says "default implementation does
>> nothing"
>
> No, the doc is correct, the NSDocument methods are called by -
> -[NSWindowController window]. Also, they are not called on the owner
> of the nib, they are called on the window controller's document.

Not at all, the windowControllerWillLoadNib messages are sent to the
owner of the nib and not to the window controller's document, and this
is exactly the heart of my question.

This can be proved with 10 lines of code.

>
>>
>> This is some kind of NSNibOwning informal protocol
>>
>> Is it safe to rely on such an undocumented behavior?
>
> I'm not sure what you're asking (How could you rely on this behavior
> without being a subclass of NSDocument?), but this behavior is not
> undocumented:
>

the role of the owner in the whole document architecture is
undocumented. I previously thaught that NSDocument was a designated
model controller and NSWindowController was a designated View
controller. It seems that the owner can be a more flexible view
controller because there is no need of subclassing.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: undocumented "NSNibOwning" informal protocol?
      • From: "Clark S. Cox III" <email@hidden>
References: 
 >Re: undocumented "NSNibOwning" informal protocol? (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Using flex and bison from within a cocoa application ?
  • Next by Date: Re: To all cocoa developers - new cocoa dev forum
  • Previous by thread: Re: undocumented "NSNibOwning" informal protocol?
  • Next by thread: Re: undocumented "NSNibOwning" informal protocol?
  • Index(es):
    • Date
    • Thread