Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   SmartDashboard custom Widgets not appearing... (http://www.chiefdelphi.com/forums/showthread.php?t=101663)

sctjkc01 31-01-2012 20:54

SmartDashboard custom Widgets not appearing...
 
For some reason, I can't get the custom Widgets I'm adding to show up in the View>>Add list. I'm dropping the Netbeans-compiled JAR in the folder C:\Program Files\SmartDashboard\extensions. Am I doing something wrong? Is there some way to access the SmartDashboard's Java console to see if it was just bad coding on my part?

eddie12390 01-02-2012 11:58

Re: SmartDashboard custom Widgets not appearing...
 
Quote:

Originally Posted by sctjkc01 (Post 1117405)
For some reason, I can't get the custom Widgets I'm adding to show up in the View>>Add list. I'm dropping the Netbeans-compiled JAR in the folder C:\Program Files\SmartDashboard\extensions. Am I doing something wrong? Is there some way to access the SmartDashboard's Java console to see if it was just bad coding on my part?

I have the exact same problem. I copied the source code word for word from the extension tutorial, added the JAR, and it still did not show up.

basicxman 01-02-2012 12:47

Re: SmartDashboard custom Widgets not appearing...
 
Quote:

Originally Posted by sctjkc01 (Post 1117405)
Is there some way to access the SmartDashboard's Java console to see if it was just bad coding on my part?

You can run a JAR in the Windows command prompt. Figure out where your Java binaries are, mine are in

Code:

C:\Program Files (x86)\Java\jdk1.6.0_16\bin
Then add these to your path.

Then open cmd.exe and

Code:

cd C:\Program Files\SmartDashboard
java -jar SmartDashboard.jar


sctjkc01 02-02-2012 18:57

Re: SmartDashboard custom Widgets not appearing...
 
On closer inspection, this is an issue on their part... that is, whoever made the SmartDashboard:

Code:

Searching Folder:.\lib
Adding Jar:.\lib\jcommon-1.0.16.jar
Adding Jar:.\lib\jfreechart-1.0.13.jar
Adding Jar:.\lib\junit-4.8.2.jar
Adding Jar:.\lib\NetworkTable_Client.jar
Searching Folder: .\extensions\lib
Adding Jar:.\extensions\lib\javacpp.jar
Adding Jar:.\extensions\lib\javacv-windows-x86.jar
Adding Jar:.\extensions\lib\javacv.jar
Adding Jar:.\extensions\lib\WPIJavaCV.jar
Searching Folder:.\extensions
Adding Jar:.\extensions\3181SmartWidgets.jar
Adding Jar:.\extensions\WPICameraExtension.jar
Searching Jar:.\extensions\3181SmartWidgets.jar
Custom Widget:VerticalBar
Searching Jar:.\extensions\WPICameraExtension.jar
Custom Static Widget:WPICameraExtension
Custom Static Widget:WPILaptopCameraExtension

Our Jar is .\extensions\3181SmartWidgets.jar, and it's obviously searching the Jar, and it's obviously finding the class (which is also an effective copy-paste from the tutorial) however it's not showing up in the menu!

Hjelstrom 02-02-2012 19:09

Re: SmartDashboard custom Widgets not appearing...
 
Quote:

Our Jar is .\extensions\3181SmartWidgets.jar, and it's obviously searching the Jar, and it's obviously finding the class (which is also an effective copy-paste from the tutorial) however it's not showing up in the menu!
Ok, I don't know if this will help but we struggled a bit with this the other day too. Here are some thoughts:

Does your custom widget inherit from "Widget" or "StaticWidget"? The only ones that show up in the menu are "StaticWidgets". To use "Widgets", have your robot send some data, then convert the widget that is automatically created into yours.

It took us a few trys to figure out where to put the extension JAR file but it looks like you've got that solved.

We were initially using NetBeans 7.1. JAR files we created with it did not work for us with the SmartDashboard. The docs say to use 6.9 but it was hard to find it on the NetBeans site.

Even though we had some hurdles to overcome, we're extremely happy with the SmartDashboard. It is terrific.

sctjkc01 02-02-2012 21:58

Re: SmartDashboard custom Widgets not appearing...
 
Oooh, OK. Now I'm understanding it clearly.

Yeah, we've got a Widget. Now I see why.


All times are GMT -5. The time now is 23:23.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi