On 02/21/2016 11:05 AM, subaochen wrote:
InsetLayout CharStyle:Function
This should be InsetLayout Flex:FunctionYou can read about these in Help>Customization (I must say that's not the clearest part of LyX documentation, though... it's actually very confusing!)
Also, if you're writing modules, it's a good idea to test them in Document Settings > Local Layout. There's even a button to convert the layouts to current format.