Go to Post it doesn't matter so much why i joined [FIRST], but that i stayed :D - sure_smile [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-02-2011, 09:42
ksanger's Avatar
ksanger ksanger is offline
Registered User
FRC #0211 (MaK)
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Rochester NY
Posts: 62
ksanger is on a distinguished road
Joystick(int,int,int) has protected access

Java Help;

We are copying examples out of WPI Robotics Library User’s Guide.pdf which state that we may define a new Joystick(int USBPort#, int #ofAxis, int #ofButtons) but when we do so Netbeans gives us an error stating that

"Joystick(int,int,int) has protected access in edu.wpi.first.pwilibj.Joystick ..."

Alt Ent shows hints which repeats the same message.

First what does this mean, and second how do we fix it. Our team wants to use a gamepad... And we were hoping to be able to determine what the gamepad response is tonight.

We did find Joystic.java and see that Joystick( int port, int numAxisTypes, int numButtonTypes){} is defined as protected. Can we just change this to public? Is this a bug? (note changing it to public and saving the file hasn't worked yet.) (note again, quite Netbeans, restarted, and now have no error message). This is extremely frustrating as the documentation didn't work the first time and I don't know if what I did to fix it is correct, nor if it broke something else?

New questions;
1) If we change a library function should we create a new copy of it and put it in our current project instead of using the library?
2) Why didn't Netbeans see the library change until we restarted it?
3) How do we determine if our change doesn't cause additional problems and break something else?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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