Re: NSView subclass bindings? NSTextView?
Re: NSView subclass bindings? NSTextView?
- Subject: Re: NSView subclass bindings? NSTextView?
- From: Kurt Marek <email@hidden>
- Date: Mon, 10 Nov 2003 18:09:53 -0800
Thanks for your help. It would have taken me forever to figure out that
turning off the 'fonts allowed' switch changes the type of value
expected.
kurt
On Nov 10, 2003, at 5:36 PM, Terrence Talbot wrote:
On Nov 10, 2003, at 4:50 PM, mmalcolm crawford wrote:
On Nov 10, 2003, at 4:05 PM, Kurt Marek wrote:
I have an NSString that I want to put into an NSTextView. The only
reason for doing this is that the string is fairly long and it would
be nice to have the vertical scroll bar. What's the easiest way to
hook up the bindings given that NSTextView is looking for RTFD data?
Do I have to convert the string to NSData, like so?
If you're just using a plain string (no formatting) then turn off the
NSTextView's "Multiple fonts allowed" attribute -- the **value**
binding (which then appears) expects an NSString...
Note: If you have previously made a binding to "data", you will have
to unbind it.
I would only add that if you've made a previous binding to data, the
binding is preserved, as mmalcom says, but now shows up as a
"Parameter" binding at the bottom of the bindings inspector. It took a
little hunting to find this late last night. Until you remove this,
you'll get a runtime exception that the binding is still looking for
"data"...
_______________________________________________
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.
_______________________________________________
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.