Aquileo | Recent changes to bugshttps://sourceforge.net/p/inkmltk/bugs/2009-08-14T14:55:51ZRecent changes to bugsAquileo | [InkMLLibJ] : channel attributes type and orientation wrong2009-08-14T14:55:51Z2009-08-14T14:55:51ZJean-Gabriel LIMBOURGhttps://sourceforge.net/u/jglimbourg/https://sourceforge.net2c582e8e0fa9518f4dd96291fbaa85ddfbbdbcf0<div class="markdown_content"><p>When defining channels with InkMLLibJ, the exported InkML is not conform with the schema. The problem affects the attributes "type" and "orientation" of the element "channel".</p> <p>For example the following code :</p> <p>final TraceFormat traceFormat = new TraceFormat();<br /> final Channel chanX = new Channel("X", ChannelType.INTEGER);<br /> chanX.setUnits("dev");<br /> traceFormat.addChannel(chanX);<br /> final Channel chanY = new Channel("Y", ChannelType.INTEGER);<br /> traceFormat.addChannel(chanY);<br /> chanY.setUnits("dev");<br /> final Channel chanF = new Channel("F", ChannelType.DECIMAL);<br /> chanY.setMin("0.0");<br /> chanY.setMax("1.0");<br /> traceFormat.addChannel(chanF);<br /> final Channel chanOTx = new Channel("OTx", ChannelType.INTEGER);<br /> traceFormat.addChannel(chanOTx);<br /> chanOTx.setMin("-60");<br /> chanOTx.setMax("60");<br /> chanOTx.setUnits("deg");<br /> final Channel chanOTy = new Channel("OTy", ChannelType.INTEGER);<br /> traceFormat.addChannel(chanOTy);<br /> chanOTy.setMin("-60");<br /> chanOTy.setMax("60");<br /> chanOTy.setUnits("deg");</p> <p>gives the following output with InkMLLibJ :<br /> &lt;traceFormat id='fmt1'&gt;&lt;channel name='X' units='dev' defaultValue='0' type='INTEGER' orientation='POSITIVE' /&gt;&lt;channel name='Y' min='0.0' max='1.0' units='dev' defaultValue='0' type='INTEGER' orientation='POSITIVE' /&gt;&lt;channel name='F' defaultValue='0' type='DECIMAL' orientation='POSITIVE' /&gt;&lt;channel name='OTx' min='-60' max='60' units='deg' defaultValue='0' type='INTEGER' orientation='POSITIVE' /&gt;&lt;channel name='OTy' min='-60' max='60' units='deg' defaultValue='0' type='INTEGER' orientation='POSITIVE' /&gt;&lt;/traceFormat&gt;</p> <p>See attached file for path proposal.</p></div>Aquileo | [InkMLLibJ] : ClassCastException on TraceFormat.toInkML()2009-08-14T14:26:30Z2009-08-14T14:26:30ZJean-Gabriel LIMBOURGhttps://sourceforge.net/u/jglimbourg/https://sourceforge.net594c611f8cfc1ab322a1c1c2da4e75cadb71f77f<div class="markdown_content"><p>When using the method Ink.toInkML() with Java 1.6, we get the following exception :<br /> java.lang.ClassCastException: java.util.HashMap$Values cannot be cast to java.util.ArrayList<br /> at com.hp.hpl.inkml.TraceFormat.toInkML(Unknown Source)<br /> at com.hp.hpl.inkml.Context.toInkML(Unknown Source)<br /> at com.hp.hpl.inkml.Definitions.toInkML(Unknown Source)<br /> at com.hp.hpl.inkml.Ink.toInkML(Unknown Source)</p></div>Aquileo | inkMLLibj: Trace.getTraceDataAsString() error2008-08-22T16:13:13Z2008-08-22T16:13:13ZAnonymoushttps://sourceforge.net/u/userid-None/https://sourceforge.netbfcf6db6f4d89dc889f681a7fe3e92432068fc58<div class="markdown_content"><p>Module: inkMLLibj<br /> Version: 0.5.0<br /> Class: com.hp.hpl.inkml.Trace#getTraceDataAsString()<br /> The method does some strange line count estimations in line 642 - 654 which results in insufficient data when writing a Trace into a XML file. See test class below.</p> <p>public class Test <br /> {<br /> public static void main(String[] args) <br /> {<br /> Trace trace = new Trace();<br /> trace.setAssociatedContext(Context.getDefaultContext());<br /> float x = 1.23456789f;<br /> float y = 1.23456789f;<br /> for (int i = 0; i &lt; 11; i++)<br /> {<br /> trace.addToTraceData("X", new float[] {x++});<br /> trace.addToTraceData("Y", new float[] {y++});<br /> }<br /> String data[] = trace.getTraceDataAsString();<br /> for (int i = 0; i &lt; data.length; i++) <br /> {<br /> System.out.print(data[i]);<br /> if (i &lt; data.length -1 &amp;&amp; !data[i].trim().endsWith(","))<br /> {<br /> System.out.print(" &lt;-- Error: this must be the last line");<br /> }<br /> System.out.println();<br /> }<br /> }<br /> }</p></div>