TextArea.SetTextAndStyle() deprecated

I am aware that TextArea.SetTextAndStyle() has been deprecated, ok. When you go to the LR you can see this:

This item has been DEPRECATED since version 2013r1 and should no longer be used.
Please use TextArea.StyledText as a replacement.

Ok but TextArea.StyledText has something missing, TextArea.TextStyleData I also get:

This item has been DEPRECATED since version 2013r1 and should no longer be used.
Please use TextArea.StyledText as a replacement.

So now how can I access that info? In most places in my code I am now using RTFData but I also have style undo stuff that use TextArea.TextStyleData, legacy code that need to read that form file and so on… any idea?

well, first you can wait with the change.
But on the long run you may need to switch to RTF.

.SetTextandStyle no longer works at all with Cocoa. Now’s the time to get your legacy code up to speed. Switch to .RTFDATA. It really is easier as you don’t have to maintain separate text and style.