Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Smart Dashboard Preferences Issue (http://www.chiefdelphi.com/forums/showthread.php?t=134713)

jagow100 16-02-2015 17:00

Smart Dashboard Preferences Issue
 
We have found that when you follow the code here on Screensteps: http://wpilib.screenstepslive.com/s/...smartdashboard you get a null pointer exception. When you initialize the Preference object, you receive a not visible error, we're assuming this is because the constructor for preferences is private. How do we get this to work?

nandeeka 16-02-2015 21:49

Re: Smart Dashboard Preferences Issue
 
You need a line like:

Code:

Preferences* prefs = Preferences::GetInstance();
or

Code:

Preferences prefs = Preferences.getInstance();
depending on the language.


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

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