• 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: Subclassing NSWindowController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSWindowController


  • Subject: Re: Subclassing NSWindowController
  • From: Chaffinch <email@hidden>
  • Date: Mon, 9 Dec 2002 13:30:38 +0000 (GMT)

--- Mike Ferris <email@hidden> wrote:

> Here's one possible implementation strategy:
>
> - document has-a NSTextStorage
> - init method of your document creates an NSTextStorage
> - load or read method of your document loads or reads into the
> NSTextStorage
> - window controller has-a
> NSTextView-NSTextContainer-NSLayoutManager chain of objects (but no
> NSTextStorage).
> - window controller creates these objects programmatically, probably
> - window controller's setDocument: makes sure the NSLayoutManager
> gets connected to the NSTextStorage of the new document (using
> NSTextStorage's addLayoutManager:).


Thanks to Mike and everyone else who offered suggestions to me on this topic.
I modified my code and got the original design working great.
However, I am interested in the points raised about using an NSTextStorage
and keeping the model and view seperate. Therefore I am no reimplementing my
code to use the NSTextView-NSTextContainer-NSLayoutManager chain of objects
mentioned by Mike.

But I have one more question, the Cocoa docs have an article titled
"Assembling the Text System by Hand" which shows how to create the
TextStorage, Container and LayoutManager. Is this the procedire I should
follow or am I over complicating things.

Regards


=====
Regards

Chaffinch
----------------------------------------------
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
_______________________________________________
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: Subclassing NSWindowController
      • From: Jérôme Laurens <email@hidden>
    • Re: Subclassing NSWindowController
      • From: Mike Ferris <email@hidden>
References: 
 >Re: Subclassing NSWindowController (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: Subject: Re: Cocoa Book / ok, ok.
  • Next by Date: Cocoa books in college libraries (was: cocoa-dev digest, Vol 2 #1637 - 17 msgs)
  • Previous by thread: Re: Subclassing NSWindowController
  • Next by thread: Re: Subclassing NSWindowController
  • Index(es):
    • Date
    • Thread