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

Re: NSTextView and NSWindowController


  • Subject: Re: NSTextView and NSWindowController
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 26 Jun 2006 16:39:38 -0500

On 24 Jun 2006, at 8:57 AM, D.K. Johnston wrote:

I made a window in IB containing NSTextField and NSTextView objects. I subclassed NSWindowController and connected it to these objects with IB outlets. Subsequently, I was able to write in the NSTextField objects with the setStringValue: method, but couldn't get anything to appear in the NSTextView object using setString:.
[immediate problem solved with bindings]

When you ran the application under the debugger, and broke in awakeFromNib, was the IBOutlet for the NSTextView set, or was it nil?

If it was nil, did your controller class implement a KVC set accessor (e.g. setFoo:) with the same key name as the NSTextView IBOutlet (e.g. IBOutlet NSTextView * foo)? Don't do that.

"For each outlet that needs a connection, the NSNib object looks for a method of the form setOutletName: in your object. If that method exists, the NSNib object calls it, passing the target object as a parameter." -- documentation for awakeFromNib in the NSNibAwaking protocol.

	-- F

_______________________________________________
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


References: 
 >NSTextView and NSWindowController (From: "D.K. Johnston" <email@hidden>)

  • Prev by Date: Does NSTextField show placeholder when bound?
  • Next by Date: NSTextView completion - show completion list when there is only a single match?
  • Previous by thread: NSTextView and NSWindowController
  • Next by thread: putting a text at bottom of a view
  • Index(es):
    • Date
    • Thread