• 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: Recreating XCode run log behavior in an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recreating XCode run log behavior in an NSTextView


  • Subject: Re: Recreating XCode run log behavior in an NSTextView
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 18 Sep 2007 09:10:11 -0700


On Sep 18, 2007, at 7:54 AM, Paul Goracke wrote:

Bindings use KVO and you're not notifying the observer of changes. Try changing your setter to

- (void) setLog:(NSString *) inString
{
	[self willChangeValueForKey:@"log"];
	[log appendString: [inString stringByAppendingString: @"\n"]];
	[self didChangeValueForKey:@"log"];
}

That is only need if he turned off the automatic aspects of KVO since he is in a method named as expected for the key he is observing.


<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/Concepts/AutoVsManual.html#//apple_ref/doc/uid/ 20001844-178255>

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Recreating XCode run log behavior in an NSTextView (From: Ken Tozier <email@hidden>)
 >Re: Recreating XCode run log behavior in an NSTextView (From: Paul Goracke <email@hidden>)

  • Prev by Date: Re: Spy++ for Cocoa/Mac OS X?
  • Next by Date: NSOutlineView Items Like iTunes 7.4
  • Previous by thread: Re: Recreating XCode run log behavior in an NSTextView
  • Next by thread: Re: Recreating XCode run log behavior in an NSTextView
  • Index(es):
    • Date
    • Thread