Go to Post I know that this might be a foreign concept but teams help each other out all the time. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 21-03-2015, 14:49
L1TH1UM L1TH1UM is offline
Registered User
FRC #4334
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Calgary, AB
Posts: 4
L1TH1UM is an unknown quantity at this point
Preferences table Null Pointer Exception

Hello,

We are having some issues using the preferences table utility on SmartDashboard. We are supposed to be getting a table from which we can edit robot preferences such as potentiometer setpoints and encoder setpoints.

However, when we run the code it throws a Null Pointer Exception because we declared the preferences varable (Preferences prefs but we didn't create and object and we are trying to use an operator (prefs.getDouble). Using "prefs = new Preferences();" does not work, and there's nothing on the wpilibj documentation that tells us how to fix this (create an object for preferences).

Here's the page we're referencing: https://wpilib.screenstepslive.com/s...smartdashboard

Our code is almost exactly the same as that just minor differences such as names and values. We are programming in Java.

Any help would be appreciated, thanks.
 


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 01:49.

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