TextScrap.toString()
Given that the TextScrap.toString() method causes a compiler error - how do I convert a TextScrap instance into a simple text string?
(flashx.textLayout.edit.TextScrap)
Here is an example of code that won't compile:-
private function copy():void
{
var scrap:TextScrap=txt.copy(); //returns a TextScrap instance.
Clipboard.generalClipboard.clear();
Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT,scrap.toString()); // This line won't compile.
Clipboard.generalClipboard.setData('TextScrap',scrap);
}
It's for adobe AIR - but that's not relevant to the issue, which is that scrap.toString() causes an error:-
Error: Call to a possibly undefined method toString through a reference with static type flashx.textLayout.edit:TextScrap.
So is it possible to get a string representation of TextScrap ?
