How to add tab stops to a paragraph style?

What’s wrong in this:

set paraStyle to current application's NSParagraphStyle's defaultParagraphStyle()'s mutableCopy()
paraStyle's setTabStops:{"20L", "250L", "330L"}

I’m getting this error when writing data to disk:

-[NSTaggedPointerString alignment]: unrecognized selector sent to instance 0x4c303235

I guess this is not the right method to set tab stops…

You need to create each NSTextTab using initWithTextAlignment:location:options:. You can pass missing value for options unless you want tabs aligned to other than tabs.

Thanks Shane. Works perfectly.
:wink: