Page 4 of 6

Re: Alternative graphical programming environment -- Enchanting

Posted: 08 Nov 2010, 14:09
by clinton10
I actually get unusual behaviour if I have an empty program -- it goes through linking and compiling and then says no NXT is present, regardless of whether one is.

Try this, please:

* Run the proper executable.
* Make a simple program -- when the Green Flag is pressed, play a sound
* Plug your NXT in with a USB cable, and turn it on. Wait for the menu screen to come up. (Your NXT has the LeJOS firmware on it, right?)
* Hit the green flag

If that doesn't work, try again, from the start, but, instead of running enchanting.exe, run verbose_enchanting.windows.bat. (You should be able to double-click on it). Can you copy and paste the text (or perhaps take a screenshot of the window) that shows what the Back End is doing?

One futher thing to try is to write out a program, choose File -> Export Code, and then see if you can manually compile it. (See an example here. If you `cd` to the directory you exported the program to, your commands will be similar to `nxjc myprogram.java` and `nxj myprogram`).

Cheers,
Clinton

Re: Alternative graphical programming environment -- Enchanting

Posted: 09 Nov 2010, 00:09
by dudmaster
I did this:
  • Firmware update
  • Simple program with Green Flag
  • Tried to run it, but a "Java exception" occurred.
No luck. The file extension on the brick was .nxj. is that correct?

Re: Alternative graphical programming environment -- Enchanting

Posted: 09 Nov 2010, 04:46
by clinton10
dudmaster wrote:I did this:
  • Firmware update
  • Simple program with Green Flag
  • Tried to run it, but a "Java exception" occurred.
No luck. The file extension on the brick was .nxj. is that correct?
It sure sounds like you've done everything right. I'm sorry to hear that it is not working. .nxj is the correct extension for the file once it has been compiled and linked; all the files on the robot will end with .nxj.

Did the Java Exception occur on the computer or on the NXT? In either case, can you provide more details -- what does the message say?

Re: Alternative graphical programming environment -- Enchanting

Posted: 09 Nov 2010, 14:31
by jojoguy14
You probably did, but just to make sure I wanted to ask. Did you set the Environment Variables on your computer? I know I almost forgot, so I wanted to make sure that you didn't.

jojoguy10

Re: Alternative graphical programming environment -- Enchanting

Posted: 09 Nov 2010, 21:57
by dudmaster
It was a Java exception on my NXT, not my computer.

Exactly what it said on the screen:

Java Exception:
Class: 78
Method: 482
PC: 33318

Thanks, Dud

Re: Alternative graphical programming environment -- Enchanting

Posted: 11 Nov 2010, 02:42
by clinton10
dudmaster wrote:It was a Java exception on my NXT, not my computer.

Exactly what it said on the screen:

Java Exception:
Class: 78
Method: 482
PC: 33318

Thanks, Dud
Thank you, Dudmaster.

Would you mind either:
  • posting a screenshot of your script
  • e-mailing me the script
  • or describing each line of the script?
That way I can see if I can figure out what is wrong.

Re: Alternative graphical programming environment -- Enchanting

Posted: 11 Nov 2010, 13:06
by dudmaster
Here:
ScreenShot.gif

Re: Alternative graphical programming environment -- Enchanting

Posted: 13 Nov 2010, 14:43
by clinton10
dudmaster wrote:Here:
ScreenShot.gif
Thank you, Dudmaster, that was what I was after.

I tried it out in my copy of Enchanting 0.0.3. I did not get the Java exception; the program seems to work, although it doesn't do much as it quits right after starting. You are using LeJOS version 0.85, are you not? I find it curious that we get different results.

I did, however, see a couple of bugs :( :

1) it appears that my code for handling comments has broken. (I was pleased with it, too -- it embeds the comment into the source file).
2) If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).

Re: Alternative graphical programming environment -- Enchanting

Posted: 13 Nov 2010, 16:35
by dudmaster
If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).


When i open it, it says ''Remote Sensor Connections enabled', and when i open a file, it says 'Remote Sensor Connections enabled'.

The Java nxj FW is : Version 0.85, Menu version 0.85!

Re: Alternative graphical programming environment -- Enchanting

Posted: 13 Nov 2010, 22:15
by clinton10
dudmaster wrote:
If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).


When i open it, it says ''Remote Sensor Connections enabled', and when i open a file, it says 'Remote Sensor Connections enabled'.

The Java nxj FW is : Version 0.85, Menu version 0.85!
I have written up both of the bugs.

The work around, until version 0.0.4 comes out (hopefully in less than a month) is to not open a file when you are working in Enchanting; just start new and put the script together. Alternatively, save all you like and export the code from the file menu and compile it manually.

Sorry about that.
Clinton