Open donpeter06 opened 7 years ago
Looks like MathView is not capable of parsing X^{+}. this part is actually causing the crash
@donpeter06 I got the same issue and your diagnosis was spot on. I have expression \(Li^{+}\)
which was causing the above exception. My question is - did you resolve this issue? How do I change my expression so that I do not get this exception while keeping the rendered expression as much similar as the original one.
@yaxhpal Nope. I ditched the native development for webview based display.
@finotes That's okay. The workaround which worked for me is - I have removed the braces for single plus sign i.e., ^{+} --> ^+
. Other cases like ^{+1} or ^{+x}
work fine without modification.
try to replace "^" , "-", "+" with ascii codes like hat,45,43
after that its work in MathView
Looks like MathView is not capable of parsing X^{+}. this part is actually causing the crash
You saved alot of time for me , Thank u so much
This is the value that i try to set in mathview
This causes an exception
java.lang.StringIndexOutOfBoundsException: length=0; index=0 at java.lang.String.charAt(Native Method) at com.x5.template.providers.TemplateProvider.parseEmbeddedExtension(TemplateProvider.java:117) at com.x5.template.providers.TemplateProvider.resourceName(TemplateProvider.java:91) at com.x5.template.providers.TemplateProvider.loadItemDoc(TemplateProvider.java:80) at com.x5.template.providers.TemplateProvider.getSnippet(TemplateProvider.java:43) at com.x5.template.providers.TemplateProvider.provides(TemplateProvider.java:29) at com.x5.template.Theme.getSnippet(Theme.java:194) at com.x5.template.Chunk.altFetch(Chunk.java:955) at com.x5.template.Chunk.altFetch(Chunk.java:858) at com.x5.template.Chunk._resolveTagValue(Chunk.java:1038) at com.x5.template.Chunk.resolveTagValue(Chunk.java:1009) at com.x5.template.SnippetTag.render(SnippetTag.java:43) at com.x5.template.Snippet.render(Snippet.java:843) at com.x5.template.SnippetTag.render(SnippetTag.java:50) at com.x5.template.Snippet.render(Snippet.java:843) at com.x5.template.Chunk.explodeToPrinter(Chunk.java:728) at com.x5.template.Chunk.renderForParentToPrinter(Chunk.java:689) at com.x5.template.Chunk.explodeForParentToPrinter(Chunk.java:681) at com.x5.template.Chunk.render(Chunk.java:643) at com.x5.template.Chunk.toString(Chunk.java:612) at io.github.kexanie.library.MathView.setText(MathView.java:69)