Loving the new CPTextView. But I am having one problem.
My CPTextView is setup in a nib. It is not editable or selectable. I set the font and text color via this code:
var textStorage = [sceneDescriptionField textStorage];
var area = CPMakeRange(0, [textStorage length]);
var textStyle = @{@"CPFontAttributeName":[CPFont systemFontOfSize:12.0], @"CPForegroundColorAttributeName":[CPColor whiteColor]};
[textStorage removeAttribute:CPForegroundColorAttributeName range:area];
[textStorage addAttributes:textStyle range:area];
When ever I click on the CPTextView, in an area that does not contain any text, I get the following error in the console:
Uncaught Error: object cannot be nil (key: CPFontAttributeName)
Any thoughts on what's causing this?
Todd