Re: Troubles running samples

masukomi <[email protected]>
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
There's a weird bug in SwiXml that we haven't been able to track down 
yet.  Personally I think it's something in j2se but....

The symptoms you've described sound similar to what I've seen with this 
bug. Basically, sometimes saying .render("some/valid/path.xml") just 
doesn't work. It can't find the file. I've had two almost identical 
classes side by side and had one work and one not. I can't explain it.  
I've looked at the SwiXml source and it was doing everything correctly. 
The way I get around it is to never specify a path that way. Instead I 
always use .render(new File("some/valid/path.xml")) which is arguably 
not the most efficient way to specify it but it's the one that requires 
the least typing.

I can't comment on the icons issue without seeing the xml and knowing 
where the icons are and all that.

-Kate



On May 2, 2004, at 12:49 PM, Olivier Poppon wrote:

> Hi,
>
> I have just discovered SwiXml and I would really start playing with 
> it, but I have a few problems just running the examples.
> I have seen several similar messages in the mailing archives, but 
> there was no proper answer.
>
> I am using Mac OS X 10.3, with java 1.4.2.
> I have put the swixml.jar in the /Library/Java/Extensions directory 
> (which add it automatically to the CLASSPATH).
>
> Then I go to the "samples" directory of swiXml. I compile all the 
> .java.
> Then I try to run one :
> 	olivier@Moon:~/Java/swixml_139/samples $ java Actions
> I get this:
> 	java.io.IOException: Resource could not be found xml/actions.xml
>
> I tried using a classpath like : java -classpath .:xml Actions, but it 
> does not work either.
>
> But if I change in Actions.java the instruction to load the xml file 
> from this :
>       swix = new SwingEngine( this );
>       swix.render( "xml/actions.xml" );
> to this:
> 		import org.jdom.input.SAXBuilder;
> 		...
>       swix = new SwingEngine( this );
>       swix.render( new SAXBuilder().build("xml/actions.xml") );
>
> Then it "works", as I can see the window/frame of the application.
>
> However, I see no icons in the menu bar
> (I also tried to run it using a classpath like : java -classpath 
> .:icons)
>
> and the combo does not work (there is a reference to it inside the 
> actions.xml as <combobox initclass="ComboModel" Action="petAction" 
> PrototypeDisplayValue="1234567890|1234567890"/>), and I have this 
> error :
> 	initclass not instantiated : 
> ComboModeljava.lang.ClassNotFoundException: ComboModel
>
> This ComboModel class is in the same directory as Actions.
>
> Can anyone help me on this ?
>
> Thanks,
>
> Olivier
>
>
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.