Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   on the dashboard, and lack of imports/declarations in tutorials (http://www.chiefdelphi.com/forums/showthread.php?t=125871)

sthreet 05-02-2014 16:24

on the dashboard, and lack of imports/declarations in tutorials
 
I'm wondering what I declare to use the dashboard?
Read this: http://wpilib.screenstepslive.com/s/...-robot-program
Didn't show what imports I use.

Also if I do dashboard.putNumber("string", 1); and then dashboard.putNumber("string", 2); will the 1 be replaced with a 2 or will there be two things onscreen?

And why do these tutorials not include all the imports/variable declarations for things, it makes me ask these questions that are probably asked every year about what they are.

Arhowk 05-02-2014 17:46

Re: on the dashboard, and lack of imports/declarations in tutorials
 
Quote:

Originally Posted by sthreet (Post 1338107)
I'm wondering what I declare to use the dashboard?
Read this: http://wpilib.screenstepslive.com/s/...-robot-program
Didn't show what imports I use.

Also if I do dashboard.putNumber("string", 1); and then dashboard.putNumber("string", 2); will the 1 be replaced with a 2 or will there be two things onscreen?

And why do these tutorials not include all the imports/variable declarations for things, it makes me ask these questions that are probably asked every year about what they are.

you don't need to initialize it on the robot, only on desktop. if you write the same key twice, the previous key gets overwritten and you only have 2 left.

Quote:

You can write Boolean, Numeric, or String values to the SmartDashboard by simply calling the correct method for the type and including the name and the value of the data, no additional code is required. Any time in your program that you write another value with the same name, it appears in the same UI element on the screen on the driver station or development computer.
...

sthreet 11-02-2014 16:49

Re: on the dashboard, and lack of imports/declarations in tutorials
 
It still isn't working, variable "SmartDashboard" not found. Tried everything I could thing of similar to that.

notmattlythgoe 11-02-2014 16:57

Re: on the dashboard, and lack of imports/declarations in tutorials
 
Quote:

Originally Posted by sthreet (Post 1341403)
It still isn't working, variable "SmartDashboard" not found. Tried everything I could thing of similar to that.

It sounds like you don't have an import for the SmartDashboard in your code.

Arhowk 11-02-2014 17:11

Re: on the dashboard, and lack of imports/declarations in tutorials
 
Quote:

Originally Posted by sthreet (Post 1341403)
It still isn't working, variable "SmartDashboard" not found. Tried everything I could thing of similar to that.

ctrl+shift+i

sthreet 12-02-2014 16:10

Re: on the dashboard, and lack of imports/declarations in tutorials
 
Thanks, that fixed it. Now I have it working. I will remember that trick for the future.


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

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