I am trying to work with Mik's UILibrary scenario. Specifically I am trying to access the value of the switch from within the UIDemo class. The following code compiles but then produces a runtime error with a null pointer exception:
Please could you explain why this error occurs and what I need to do to access the value of the switch state.
Many thanks in advance.
public void act(){ boolean test = onOff.isOn(); }