• 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: Mutable/non-mutable bindings in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutable/non-mutable bindings in NSTextView


  • Subject: Re: Mutable/non-mutable bindings in NSTextView
  • From: Camillo Lugaresi <email@hidden>
  • Date: Sat, 25 Feb 2006 19:06:41 +0100

On 25/feb/06, at 17:22, David wrote:

Yes, I missed that key step. Thanks. I've found that I can also use willChangeValueForKey and didChangeValueForKey then do the regular release and new allocation.

Since I will be continuously updating the NSTextView contents programmatically as well, it appears I will have to do something like:

[self willChangeValueForKey:@"log"];
NSString *newLogContents = [[log stringByAppendingString:@"more contents added"] retain];
[log release];
log = newLogContents;
[self didChangeValueForKey:@"log"];


Is this correct approach?

I wouldn't use bindings for the contents of a log, unless updates are infrequent and it's limited to a very short length.


Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Mutable/non-mutable bindings in NSTextView
      • From: Greg Herlihy <email@hidden>
References: 
 >Re: Mutable/non-mutable bindings in NSTextView (From: Greg Herlihy <email@hidden>)
 >Re: Mutable/non-mutable bindings in NSTextView (From: David <email@hidden>)

  • Prev by Date: Re: iTunes like toolbar
  • Next by Date: Re: copying files with admin privileges
  • Previous by thread: Re: Mutable/non-mutable bindings in NSTextView
  • Next by thread: Re: Mutable/non-mutable bindings in NSTextView
  • Index(es):
    • Date
    • Thread