• 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: Best way to use NSTextList?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to use NSTextList?


  • Subject: Re: Best way to use NSTextList?
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 31 May 2005 12:39:52 -0700


On May 31, 2005, at 12:14 PM, August Mueller wrote:

I'm trying to use NSTextList in my application, and I'm stumbling on how best to use it.  From what I can tell, when a NSTextList is added via the pulldown in the ruler (using the disk option), a series of things happen:


A tab stop 11pts from the left is added

The string "\t{disk}\t" is inserted (where {disk} is a bullet)

The head indent is set to 36

A NSTextList is added to the paragraph style.


If I wanted to create a shortcut in my menu to do this (so the user wouldn't have to bring up the ruler) do I have to perform all these steps myself, or is there some method I'm missing that will do all this for me?  And if I have to do this all by hand, what determines the 11pt tab stop, and the 36pt head indent?



NSTextList in and of itself does not determine the precise formatting of the list paragraphs; it merely serves as an organizing device for determining which items belong to which lists, and what markers should be used.  The tab location, head indent, and first line head indent set by NSTextView are its default choice for the style, but the user could (for example) modify the head indent for those paragraphs to any desired value.

So far there is no public API for adding or removing list formatting for a section of a document.  The full set of things to do here is rather complicated, especially when nested lists are involved.  You can certainly file an enhancement request for methods to do this.

Douglas Davidson

 _______________________________________________
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: 
 >Best way to use NSTextList? (From: August Mueller <email@hidden>)

  • Prev by Date: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)
  • Next by Date: Re: NSString's drawInRect: problems
  • Previous by thread: Best way to use NSTextList?
  • Next by thread: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)
  • Index(es):
    • Date
    • Thread