[squeak-dev] Interaction with Sugar on Ubuntu.
Gustavo Duarte
gduarte at activitycentral.com
Thu Jan 16 19:34:06 UTC 2014
Sorry, my mistake I introduce a false clue, I thought the bug was on
XMLDOMParser, but doing a more deeply analysis I guess that the problem is
on the Class which call XMLDOMParser, more precisely on the method
gconfPropertiesAt of SugarLauncher class, bellow paste the source code:
gconfPropertiesAt: aString
| dir |
"search up tree to guess home dir"
dir := Project squeakletDirectory.
[dir pathName = '/'] whileFalse: [
dir := dir containingDirectory.
[FileStream
readOnlyFileNamed: dir pathName, '/.gconf', aString,
'/%gconf.xml'
do: [:f |
| props |
props := Dictionary new.
(XMLDOMParser parseDocumentFrom: f)
tagsNamed: #entry do: [:entry |
props at: (entry attributeAt: 'name')
put: entry elements first contentString].
^props].
] on: FileDoesNotExistException do: [:ignore | ].
].
^self error: 'cannot find gconf path ', aString
Why i'm saying that XMLDOMParser isn't the problem, because i did the test,
call XMLDOMParser passing the xml file and the parsing work fine:
f:=FileStream readOnlyFileNamed:
/home/estudiante/.gconf/desktop/sugar/user/%gconf.xml'
XMLDOMParser parseDocumentFrom: f
Thoughts ?
Thanks in advance.
On Thu, Jan 16, 2014 at 2:06 PM, Georg Gollmann
<gollmann at zid.tuwien.ac.at>wrote:
>
> Am 16.01.2014 um 16:21 schrieb Gustavo Duarte <gduarte at activitycentral.com
> >:
>
> So if i understood well you, adding a schema specification to xml file,
> should resolve the problem ?
>
>
> Not really. The schema would just define whether the file or the
> application code is in error.
> Essentially you have already resolved the problem by giving the file a
> structure the application can deal with.
> In any case AFAIK the XMLDOMParser is not part of the problem.
>
> Kind regards
> Georg
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140116/52e92a38/attachment.htm
More information about the Squeak-dev
mailing list
|