SIXX and ScaledDecimal problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SIXX and ScaledDecimal problem

GLASS mailing list
Ciao,

i work with Pharo 4.0 and Glass 3.1.0.6 

Now into GLASS i create a SIXX file with:

Object serialize: ( UserGlobals at: #Scandella ) toSixxFile: 'Scandella160209A.sixx'.

and i read with:

( Object materializeFromSixxFile: 'Scandella160209A.sixx' ).

And all works fine.



When into Pharo i  do the command:

| fileStream | fileStream := ( FileDirectory on: '/DTR-Backup/' ) fileNamed: 'Scandella160209A.sixx'. ^Object readSixxFrom: fileStream contents.

the system answer the exception : 

SixxPortableUtil class>>signalException:

[ :ex | SixxPortableUtil signalException: (SixxXmlParseError originalError: ex) ] in SixxXmlUtil class>>parseXml: in Block: [ :ex | SixxPortableUtil signalException: (SixxXml...etc...

BlockClosure>>cull:

Context>>evaluateSignal:

Context>>handleSignal:

XMLWellFormednessException(Exception)>>pass

XMLParser>>handleParserError:

[ :error | self handleParserError: error ] in XMLParser>>parseDocument in Block: [ :error | self handleParserError: error ]

BlockClosure>>cull:

Context>>evaluateSignal:

Context>>handleSignal:

XMLWellFormednessException(Exception)>>signal

XMLWellFormednessException(Exception)>>signal:

XMLWellFormednessException class(Exception class)>>signal:

SAXParserDriver(XMLParserDriver)>>handleParseError:

XMLWellFormedParserTokenizer>>parseError:

XMLWellFormedParserTokenizer>>errorInvalidCodePoint:

XMLWellFormedParserTokenizer>>nextCharacterReferenceOnWriteStream

XMLWellFormedParserTokenizer>>nextPCDataToken

XMLWellFormedParserTokenizer(XMLParserTokenizer)>>nextContentToken

XMLContentContext>>nextTokenFrom:

XMLWellFormedParserTokenizer(XMLParserTokenizer)>>nextToken

[ [ self tokenizer atEnd ] whileFalse: [ self tokenizer nextToken ] ] in XMLParser>>parseDocument in Block: [ [ self tokenizer atEnd ] whileFalse: [ self toke...etc...

BlockClosure>>on:do:

XMLParser>>parseDocument

XMLDOMParser(SAXHandler)>>parseDocument

XMLDOMParser class(SAXHandler class)>>parse:

SixxYaxo3XmlParserAdapter class>>parseXml:

[ self parserAdapter parseXml: xmlStringOrStream ] in SixxXmlUtil class>>parseXml: in Block: [ self parserAdapter parseXml: xmlStringOrStream ]...etc...

BlockClosure>>on:do:


The exception is erase when in the stream the system found &# .... for example:

example 1: <sixx.object sixx.id="215" sixx.name="descrizioneBreve" sixx.type="String" >Pizzette - 3&#44;00</sixx.object>


example 2: <sixx.object sixx.id="21411" sixx.name="codice" sixx.type="String" >C&#0;i&#0;t&#0;t&#0;Ã&#0; &#0; &#0;A&#0;l&#0;t&#0;a&#0;</sixx.object>

Someone has experience in this regard? 



In the same project i found problem when in Pharo ( i read  the same GLASS sixx  file ) the sixx need to create a ScaledDecimal instance :

<sixx.object sixx.id="20212" sixx.name="valore" sixx.type="ScaledDecimal" >60,00</sixx.object>


Now i used ScaledDecimal to manage number with specific resolution  ( prices and .... )

It's correct o there's best class for management these data ?

Thanks, 

Dario

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass