• 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
NSAttributedString and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAttributedString and bindings


  • Subject: NSAttributedString and bindings
  • From: Matt Baker <email@hidden>
  • Date: Sat, 05 Jun 2004 22:01:35 -0500

I'm trying to write a master-detail interface with a NSTextView to show details of a single record and a NSScrollView to show the master list. I am trying to show the first part of the string in the scrollview, and I'm using bindings to control the view.

I'm trying to grab the styled string and returning an unstyled string to place in the scrollview using the strText below:

@implementation LinerAd

-(NSAttributedString *)aText { return _adText; }


-(NSString *)strText
{
return [_aText string];
}

...

Now if I bind "aText" to the column, I get a set of hex characters (like <7b5c7274 66315c6d...). If I bind to strText I get nothing in the view but the log shows:

2004-06-05 22:00:17.919 BindingTest1[2306] *** -[NSConcreteMutableData string]: selector not recognized
2004-06-05 22:00:17.919 BindingTest1[2306] *** -[NSConcreteMutableData string]: selector not recognized

Am I wrong in using NSAttributedString to store styled text, or am I using the string converter wrong?

Thanks.
_______________________________________________
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: NSAttributedString and bindings
      • From: "b.bum" <email@hidden>
    • Re: NSAttributedString and bindings
      • From: mmalcolm crawford <email@hidden>
    • Re: NSAttributedString and bindings
      • From: Allan Odgaard <email@hidden>
    • Re: NSAttributedString and bindings
      • From: Matt Baker <email@hidden>
  • Prev by Date: Re: Sample code to do pup-up type of controls?
  • Next by Date: Re: NSAttributedString and bindings
  • Previous by thread: Re: Sample code to do pup-up type of controls?
  • Next by thread: Re: NSAttributedString and bindings
  • Index(es):
    • Date
    • Thread