I am unable to initialize or store an object in a class that extends the Application AppBase, Is this expected?
With the below implementation I get a "Illegal Access(AOB)" error
*This is for a DataField
class MySensorImplementation() {
function initialize() {
// Stuff
}
}
class MyApp extends App.AppBase {
var sensor;
function initialize() {
AppBase.initialize();
sensor = new MySensorImplementation();
}
// onStart() is called on application start up
function onStart(state) {
AppBase.onStart(state);
}
// onStop() is called when your application is exiting
function onStop(state) {
AppBase.onStop(state);
sensor.close() // <-- this is why i want sensor to be initialized here
}
// Return the initial view of your application here
function getInitialView() {
return [
new myView(sensor) <-- I want to pass sensor in here
];
}
}