• 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: NSView subclass bindings? NSTextView? (WebView?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView subclass bindings? NSTextView? (WebView?)


  • Subject: Re: NSView subclass bindings? NSTextView? (WebView?)
  • From: René Puls <email@hidden>
  • Date: Tue, 11 Nov 2003 07:44:02 +0100

Am 11.11.2003 um 01:50 schrieb mmalcolm crawford:

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...

You have no idea how long I experimented with NSTextView just to make it accept a simple NSString via bindings. I ended up writing a complicated value transformer which converts a string into NSData with pseudo-html wrappers, including a content-type hint which tells the text view about the correct data encoding. This really did work, by the way, but some more documentation would have been helpful. :-)

Speaking of bindings, is there a similar trick to get some useful bindings for a WebView? When I select it in IB, only a "hidden" property is available.

Kind regards,
Rene Puls
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSView subclass bindings? NSTextView? (WebView?)
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSView subclass bindings? NSTextView? (From: Terrence Talbot <email@hidden>)
 >Re: NSView subclass bindings? NSTextView? (From: mmalcolm crawford <email@hidden>)
 >Re: NSView subclass bindings? NSTextView? (From: mmalcolm crawford <email@hidden>)
 >Re: NSView subclass bindings? NSTextView? (From: Terrence Talbot <email@hidden>)
 >Re: NSView subclass bindings? NSTextView? (From: Kurt Marek <email@hidden>)
 >Re: NSView subclass bindings? NSTextView? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: NSXMLParser question
  • Next by Date: Re: Cocoa Examples Using Sockets?
  • Previous by thread: Re: NSView subclass bindings? NSTextView?
  • Next by thread: Re: NSView subclass bindings? NSTextView? (WebView?)
  • Index(es):
    • Date
    • Thread