Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Cannot use RobotDrive! (http://www.chiefdelphi.com/forums/showthread.php?t=90299)

hornetshornets 27-01-2011 20:57

Cannot use RobotDrive!
 
We are programming with Java as an option this year, and whenever we call the RobotDrive class, we get an error stating:
"Cannot find symbol:
class RobotDrive"

What should we do?

All help is greatly appreciated!
- Team 1816 -

Alexander Meyer 27-01-2011 21:10

Re: Cannot use RobotDrive!
 
Have you imported the RobotDrive class? The default examples only import the IterativeRobot or SimpleRobot classes, nothing else. You could import all the WPILibJ classes in one fell swoop with this line:

Code:

import edu.wpi.first.wpilibj.*

Patrick Chiang 01-02-2011 00:06

Re: Cannot use RobotDrive!
 
The Source > Fix Imports function in netbeans is cool. Just use it all the time when you see random yellow lightbulbs in your code.

Egg 3141592654 01-02-2011 08:38

Re: Cannot use RobotDrive!
 
If the asterisk at the end of your wpilib import call doesn't work, use the netbeans autofill feature to add RobotDrive class as its own import. Whenever I have import problems, I just add the individual class in my import field. Hope you don't have to do that though, it gets a bit tedious when your team uses a lot of components which require a lot of classes.


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

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