Hi there,
I'm getting an error saying: non-static variable MainList cannot be referenced from a static context.
My snippet of code where the error is occuring:
//this method is in a class called ViewContact
public void printInfo(){
int index = MainScreen.MainList.getSelectedIndex();
}
Now the List "MainList" is in a class called MainScreen and has public access.
What I'm trying to do, is get an int from the getSelectedIndex() method of the
List class.. But the error above gets thrown.
Thanks for any help!