• 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
Using an NSTextList
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using an NSTextList


  • Subject: Using an NSTextList
  • From: Ian was here <email@hidden>
  • Date: Thu, 8 Dec 2005 15:02:30 -0800 (PST)

NSTextList *textList = [[NSTextList alloc]
initWithMarkerFormat:@"({decimal})"
options:NSTextListPrependEnclosingMarker];

NSMutableParagraphStyle *paragraphStyle =
[[NSMutableParagraphStyle alloc] init];
NSRange textRange =
NSMakeRange( 0, [[textStorage string] length]);


[paragraphStyle setTextLists:[NSArray
arrayWithObject:textList]];
[myTextStorage
addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle range:textRange];


[paragraphStyle release];
[textList release];


I'm trying to create a bulleted list in my text view
using NSTextList. In theory, this code should do the
trick. Does anyone see any reason why this wouldn't
work?

Thanks


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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

  • Prev by Date: RE: Odd behaviour in setContentView:
  • Next by Date: Re: NSObject Foundation tool memory issue?
  • Previous by thread: RE: Odd behaviour in setContentView:
  • Next by thread: WebDataSource, Cocoa Plug-in puzzlement
  • Index(es):
    • Date
    • Thread