• 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: Delegate for multiple NSTextViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delegate for multiple NSTextViews


  • Subject: Re: Delegate for multiple NSTextViews
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 14 Apr 2004 14:43:49 -0700

On Apr 14, 2004, at 2:01 PM, Rob Minerick wrote:

What I have is multiple views of a single NSTextStorage and each view has a delegate. The problem I'm having is that only the first text view I create actually calls the delegate when I make a change in the view. The other views never call their delegate. To illustrate the problem, I've taken the simple TextViewConfig example from Apple (http://developer.apple.com/samplecode/TextViewConfig/ TextViewConfig.html) and modified it accordingly:

When multiple text views share a single layout manager, they also share significant portions of their state, since they represent succeeding pages or other regions for text layout within the same document. For example, they share the selection, and the typing attributes, and many other pieces of state--including the delegate. Most delegate methods are sent from the first text view, called the "notifying" text view. When the notifying text view changes, there is a notification sent out so that notification listeners can change the object they are listening to, but delegates don't have to worry about that.

Douglas Davidson
_______________________________________________
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.


References: 
 >Delegate for multiple NSTextViews (From: Rob Minerick <email@hidden>)

  • Prev by Date: Re: Calling subclassed methods on Cocoa objects
  • Next by Date: Re: Delegate for multiple NSTextViews
  • Previous by thread: Delegate for multiple NSTextViews
  • Next by thread: Re: Delegate for multiple NSTextViews
  • Index(es):
    • Date
    • Thread