5 Replies Latest reply: Mar 18, 2012 10:53 PM by Jin-Huang RSS

    Force format resolver to resolve again

    will_spi Community Member



      Currently I am using a format resolver to pick up custom user style attributes on paragraph elements and translating them into TextLayoutFormat properties. This is working well, as I am able to perform tasks such as getting properties from external style sheets. For example, ...<p myExternalStyle="someExternalStyle">..., and someExternalStyle, stored externally, would contain properties such as font size, font color, etc.


      In the application workflow, sometimes the properties within the external style sheets may change, and, when this happens, I would like to recompose or refresh the text  such that my format resolver gets called again. This would allow the format resolver to reassign updated properties  from the external style sheet, and cause the text properties to be updated. However, I have tried:


      textFlow.flowComposer.damage(0, textFlow.textLength, FlowDamageType.INVALID);


      followed by either textFlow.flowComposer.compose() or textFlow.flowComposer.updateAllControllers(), but the format resolver is not called again on the text. Is there a way to force or damage the text flow such that a recompse or update would force the format resolvers to get called again?


      Thank you for the help.