APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

problem with Equation in EJS_4.3.7_130516\EJS_4.3.7 post and replies

Return to the problem with Equation in EJS_4.3.7_130516\EJS_4.3.7 thread
Login to post to this thread

problem with Equation in EJS_4.3.7_130516\EJS_4.3.7
lookang Avatar
lookang
245 Posts

dear prof paco, it seems there is a problem with Equation in EJS_4.3.7_130516\EJS_4.3.7.

the model https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v8wee.zip runs when it is in EJS authoring environment

http://weelookang.blogspot.sg/2010/08/ejs-open-source-gravitational-field.html

prototype may not work: https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v8wee.jar

working model:

https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v7wee.jar

author: lookang and andrew based on andrew duffy early model

worksheets by (lead) YJC: same link of four simulations https://www.dropbox.com/s/53vztw6meupn4r5/GravitationYJC.zip

 

but after compling it cannot be open correctly see https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v8wee.jar

bug in equation  https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v8wee.jar

for info, the working model without the equations inserted it can be found here https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v7wee.jar

error message on opening up EJS console again

Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $
Scanner invalid character: $

 

 

 

by the way, I have been able to remix and repurpose many EJS models, just want to thank you for creating this wonderful tool!

Post edited August 11, 2013 at 11:32 PM EST.

Post edited August 11, 2013 at 11:32 PM EST.

Post edited August 11, 2013 at 11:51 PM EST.

Post edited August 11, 2013 at 11:52 PM EST.

Post edited August 12, 2013 at 2:05 AM EST.

Attached File: ejs_GField_and_Potential_1D_v8wee.zip


OSP@SG blog
OSP@SG Digital Library

Replies to problem with Equation in EJS_4.3.7_130516\EJS_4.3.7

Re: problem with Equation in EJS_4.3.7_130516\EJS_4.3.7 -
Francisco Esquembre
237 Posts

LooKang,

It is curious. Your file doesn't even run in my computer under EJS. The reason may be the following:

- The VBOX and HBOX layouts are very poor. Too many of them nested confuse the windowing system so much that it actually fails to load. This happens to me with your example. Please, limit the number of uses of either VBOX or HBOX. Replace by Grid, this is MUCH more solid.

- The Equation had two properties. One is Variable and the other is "Initial Value". Use "Initial Value" for constant text. There is no need for you to type the $ in the Latex expressions. Actually, it hurts the element. And no need to add string. A single constant string will do.

All in all, I can only say that Equation is a third party product. I have limited power to fix it.

Paco



Re: Re: problem with Equation in EJS_4.3.7_130516\EJS_4.3.7 -
lookang Avatar
lookang
245 Posts

thank you for looking into this matter :)

i did a little experiment
i created fresh copy of EJS with just one equation.
the problem of launching the EJS as an compiled app continue to exist.
https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_Unnamed.jar

i speculate u have the power to fix it ? :)


noted on the V-HBOX
the removing of "$" did the job, it removes the error during compilation. nice tip!


inserting into initial value for equation causes a outarea error
Exception in thread "main" java.lang.StackOverflowError
at java.util.HashMap.get(Unknown Source)
at sun.awt.AppContext.get(Unknown Source)
at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)
at java.awt.Toolkit.getEventQueue(Unknown Source)
at java.awt.EventQueue.isDispatchThread(Unknown Source)
at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)
at org.colos.ejs.library.control.EjsControl.update(Unknown Source)
at org.colos.ejs.library.Animation.update(Unknown Source)
at org.colos.ejs.library.Animation.updateWhenIdle(Unknown Source)
at org.colos.ejs.library.control.EjsControl.updateSimulationWhenIdle(Unknown Source)
.............

Attached File: ejs_Unnamed.zip


OSP@SG blog
OSP@SG Digital Library


Re: Re: problem with Equation in EJS_4.3.7_130516\EJS_4.3.7 -
lookang Avatar
lookang
245 Posts

dear prof paco, good news!

i figure out the bug. in equation, cannot use //phi but can use //frac only.

thus, i use text to render $//phi$ the result is a working model compiled

updated 19 august 2013 a working copy can be downloaded here prototype working by using text to render $//phi_net$ and equation to render " - \\frac{G{M_1}}{{r_1}}" work:

https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_GField_and_Potential_1D_v8wee.jar

http://weelookang.blogspot.sg/2013/08/enhanced-two-mass-model-after-student.html

 

enjoy!

 


OSP@SG blog
OSP@SG Digital Library


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book