I suspect that the problem here is that Ptolemy is not properly 
handling the locale.

ptolemy/actor/gui/MoMLApplication.java
says:
        // Even if the user is set up for foreign locale, use the US locale.
        // This is because certain parts of Ptolemy (like the expression
        // language) are not localized.
        // FIXME: This is a workaround for the locale problem, not a fix.
        // FIXME: In March, 2001, Johan Ecker writes
        // Ptolemy gave tons of exception when started on my laptop
        // which has Swedish settings as default. The Swedish standard
        // for floating points are "2,3", i.e. using a comma as
        // delimiter. However, I think most Swedes are adaptable and
        // do not mind using a dot instead since this more or less has
        // become the world standard, at least in engineering. The
        // problem is that I needed to change my global settings to
        // start Ptolemy and this is quite annoying. I guess that the
        // expression parser should just ignore the delimiter settings
        // on the local computer and always use dot, otherwise Ptolemy
        // will crash using its own init files.
        try {
            java.util.Locale.setDefault(java.util.Locale.US);
        } catch (java.security.AccessControlException accessControl) {
            // FIXME: If the application is run under Web Start, then this
            // exception will be thrown.
        }

Also, it looks like you are using the precompiled version, yet
starting it by hand.  This is tricky  because of the number of jar
files to include.

One issue is that the Windows precompiled version invokes
ptolemy.actor.gui.jnlp.FullApplication
which in turn invokes ptolemy.vergil.VergilApplication, which extends
MoMLApplication.

It could be that there are problems surrounding the local when
invoking VergilApplication that are fixed when FullApplication is
invoked directly.

http://javaalmanac.com/egs/java.util/SetDefLocale.html

Suggests calling java with -Duser.language= and/or -Duser.region 
It could be that you could force the User language en and
user-region to US

java -Duser.language=en -Duser.region=US \
     -cp \
     
"${PTII}/ptolemy/ptsupport.jar;${PTII}/ptolemy/vergil/vergil.jar;${PTII}/ptolemy/copernicus/copernicus.jar;${PTII}/ptolemy/domains/domains.jar;${PTII}/lib/diva.jar;${PTII}/ptolemy/actor/gui/jnlp.jar"
 \
ptolemy.vergil.VergilApplication Lorenz.xml

Sorry about the locale problems, we have not yet identified a good
solution to this problem.  

You might find it easier to work from the source release, it can be
easier to debug problems.  The prebuilt windows installer is really 
a runtime only version.

-Christopher


--------

    Hello,
    
    I begin with ptolemy, and I have a problem to execute it by using a 
    command line:
    I use the command :
    
    java -Xmx512M -cp 
    "c:\projets\PtolemyExe\ptolemy\ptsupport.jar";"c:\projets\PtolemyExe\ptolem
   y\vergil\vergil.jar";"c:\projets\PtolemyExe\ptolemy\copernicus\copernicus.ja
   r";"c:\projets\PtolemyExe\ptolemy\domains\domains.jar";"c:\projets\PtolemyEx
   e\lib\diva.jar" 
    ptolemy.vergil.VergilApplication  c:\\projets\\Lorenz.xml
    
    And when I want to complete the exemple with a clock (or other component), 
    I got the following message :
    *---------*
    ptolemy.kernel.util.IllegalActionException: Error evaluating expression: 
    0,0
       in .LorenzFile.Clock.stopTime
    Because:
    Error parsing expression "0,0":
    Encountered "," at line 1, column 2.
    Was expecting one of:
         <EOF>
         "+" ...
         "-" ...
         "*" ...
         "/" ...
         "%" ...
         "^" ...
         ">" ...
         "<" ...
         ">=" ...
         "<=" ...
         "!=" ...
         "==" ...
         "&&" ...
         "||" ...
         "&" ...
         "|" ...
         "#" ...
         "<<" ...
         ">>" ...
         ">>>" ...
         "(" ...
         "?" ...
         "." ...
                at ptolemy.data.expr.Variable.validate(Variable.java:1060)
        at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:487)
        at com.microstar.xml.XmlParser.doParse(XmlParser.java:179)
        at com.microstar.xml.XmlParser.parse(XmlParser.java:146)
        at ptolemy.moml.MoMLParser.parse(MoMLParser.java:826)
        at ptolemy.moml.MoMLParser.parse(MoMLParser.java:913)
        at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:228)
        at 
    ptolemy.vergil.basic.EditorDropTarget$1._execute(EditorDropTarget.java:237)
        at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:127)
        at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:710)
        at 
    ptolemy.vergil.basic.EditorDropTarget$DTListener.drop(EditorDropTarget.java
   :284)
        at java.awt.dnd.DropTarget.drop(DropTarget.java:398)
        at 
    sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContex
   tPeer.java:542)
        at 
    sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.ja
   va:52)
        at 
    sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunD
   ropTargetContextPeer.java:805)
        at 
    sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropT
   argetContextPeer.java:743)
        at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
        at java.awt.Component.dispatchEventImpl(Component.java:3494)
        at java.awt.Container.dispatchEventImpl(Container.java:1627)
        at java.awt.Component.dispatchEvent(Component.java:3477)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:348
   3)
        at 
    java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:3269)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3123)
        at java.awt.Container.dispatchEventImpl(Container.java:1613)
        at java.awt.Window.dispatchEventImpl(Window.java:1606)
        at java.awt.Component.dispatchEvent(Component.java:3477)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
        at 
    java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.j
   ava:201)
        at 
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.jav
   a:151)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145
   )
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137
   )
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    *---------*
    
    When I use the vergil full executable, I don't have this problem.
    Could someone explain me the troubble ?
    
    
    thanks,
    
    Céline Piallat
    SILICOM
    Blagnac (France)
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to