Author Topic: Question about one error message./board:23-101-  (Read 32143 times)

Alex_10

  • Newbie
  • *
  • Posts: 6
Question about one error message./board:23-101-
« on: July 17, 2011, 06:29:32 pm »
I have one question about one program that i'm programming in EJS:

I try to made the simulation of this program and i get one error "_view.drawingPanel3D.repaint(?);"


...i don't know what mean with this error message, because my simulation is in 2D and i don't have anything about 3D in my program.


This is the "applet source code" of my programm:

* Class : satelite_474Applet.java
* Generated using * Easy Java Simulations Version 4.3.3.2, build 110619. Visit http://www.um.es/fem/Ejs
*/

...package satelite_474_pkg;

import org.colos.ejs.library._Ejs?Constants;

public class satelite_474Applet extends org.colos.ejs.library.Laun?cherApplet {

static {



org.opensourcephysics.disp?lay.OSPRuntime.loadTransla?torTool = false;



org.opensourcephysics.disp?lay.OSPRuntime.loadExportT?ool = false;
}

public void init () {



super.init();



org.opensourcephysics.tool?s.ResourceLoader.addApplet?SearchPath("/");



org.opensourcephysics.tool?s.ResourceLoader.addSearch?Path(getCodeBase()+""); // This is for relative files



org.opensourcephysics.tool?s.ResourceLoader.addSearch?Path(""); // This is for relative files, too



//org.colos.ejs.library.Si?mulation.setPathToLibrary(?getCodeBase()); // This is for classes (such as EjsMatlab) which needs to know where the library is



satelite_474._addHtmlPageI?nfo("Página Intro","_default_","Página? Intro","./satelite_474_Int?ro 1.html");



if (getParentFrame()!=null) {



_model = new satelite_474 ("drawingFrame",getParentF?rame(),getCodeBase(),this,?(String[])null,true);



_simulation = _model._getSimulation();



_view = _model._getView();



}



else {



_model = new satelite_474 (null,null,getCodeBase(),t?his,(String[])null,true);



_simulation = _model._getSimulation();



_view = _model._getView();



}



_simulation.initEmersion()?;
}
public void _reset() { ((satelite_474)_model)._re?set(); }
public void _initialize() { ((satelite_474)_model)._in?itialize(); }
public void stop() { ((satelite_474)_model)._on?Exit(); }
} // End of class satelite_474Applet
 

Someone could help me? thanks....

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Question about one error message./board:23-101-
« Reply #1 on: July 17, 2011, 06:39:01 pm »
Please upload your ejs source as attachement.

You should not compile ejs generated java file. You should use EJS to compile it for you!

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #2 on: July 17, 2011, 06:43:44 pm »
I attach the .xml, i think that this is the file that you mean.

Thank you.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Question about one error message./board:23-101-
« Reply #3 on: July 17, 2011, 08:23:52 pm »
1. You have defined many variables in variable panel, However, you did not provide initial values for many of those variables.
For example: You want satalite to rotate with angle o, but you never provide a value to variable o.

2. You defined a variables named as "drawingPanel3D". However, it is the same name for a 3D object(drawingPanel3D).
3. You have added two empty plottingPanel(without any GUI element in it).
There are too many strange setting in your ejs file and I do not know what you really want to do.
So I do not know how to correct it for you! 

lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Question about one error message./board:23-101-
« Reply #4 on: July 18, 2011, 05:30:35 pm »
I attach the .xml, i think that this is the file that you mean.

Thank you.

i think you need to remove all the codes that are creating the errors
for example
Incorrect value for transformation: ro:PosVol

i have removed all the errors, u need to put it back in with the appropriate syntax.

the key to programming in ejs could be to rename your project files at key implementation stages of new codes.

satellite_474.xml

do you have satellite_460 to share? i cannot get your source to run so i have little idea with your simulation aims to do and can do.

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #5 on: July 18, 2011, 06:01:53 pm »
What do you mean with satellite_460?? How do you put out the error messages??  (thank you)

The salellite should turn and should be controlled for the wheel, the unic variable control is the Torque.


lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Question about one error message./board:23-101-
« Reply #6 on: July 18, 2011, 06:21:43 pm »
Can u find the search icon on ejs?
I look at the error codes generated from the console.
Use the search to identify the location of the search
For example "posvol"
It will show all instants where the "posvol" occur
Remove them or fix them.

It is ok not to have satellite 4xx.XML
Just start to save different versions now so if things screw up so badly, can always abandon the file n revert to older files.

Look at the new source codes for the details

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #7 on: July 18, 2011, 06:23:14 pm »
How should i indicate the rotation of the satellite?? i wrote this "r:0,0 & ro:o" but doesn't work.

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Question about one error message./board:23-101-
« Reply #8 on: July 18, 2011, 09:15:51 pm »
May i misunderstanding something here, but when i check the xml source code, found that have many variables missed, uncompleted values, even the simulation doesn't running with me is always frozen,

by the way : I'm using the last version ejs 4.3.3.1

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #9 on: July 18, 2011, 09:26:38 pm »
I attach the last version, anyway i don't get the rotation of the satellite.

lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Question about one error message./board:23-101-
« Reply #10 on: July 18, 2011, 09:41:38 pm »
Maybe u can read my source code from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2204.0
I made a satellite too

Yes Ahmed it is not working yet
« Last Edit: July 18, 2011, 10:06:58 pm by lookang »

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Question about one error message./board:23-101-
« Reply #11 on: July 19, 2011, 02:30:18 am »
Well, i suggest that you can use some satellite motion examples in ntnu as a reference, applets created by prof Hwang, lookang, i believe this can help you
To watch what you miss variables page, here some examples URLs

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=517.0

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1877.0

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1723.0

You can download the jar file and unzip, open xml source code using Ejs and look to variables to find what your project missed and what you need to add.











 

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #12 on: July 19, 2011, 11:18:10 pm »
The first thing, thank you really much too all for the help. You did amazing things with EJS  :o!!! For me is new this word, but really interesting.

The second thing, i check the examples thet you sent me and the question is: do I need one string for make the rotation?

My simulation is more easy than yours, i call this object satellite, becuase in the text of the exercise was write satelite, but the real thing is that is one obeject who's move only with rotation. So..... for make the rotation (in my case that is 2D) i understood that i should create one variable string (in my case rotString "y:0").

Am i rigth?  ???

Alex_10

  • Newbie
  • *
  • Posts: 6
Re: Question about one error message./board:23-101-
« Reply #13 on: July 19, 2011, 11:20:53 pm »
Could you send me more examples where one object made one move of rotation??? Thank you really much.

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Question about one error message./board:23-101-
« Reply #14 on: July 20, 2011, 12:01:16 am »
May you attach images for what you want , for me can have idea, i can also modified applet for be like you want, but as i said will be helpful
that you attach some images show the object that you want, this help professor Hwang, lookang and me to help you.

For example here is a simple modified i done, the original applet created by prof Hwang.

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: July 20, 2011, 01:36:50 am by ahmedelshfie »