Use
Code:
if (otherclass.somevar == false){
//...
Also, the somevar declared in the document class is completely separate from that declared in the other class. You probably only want the otherclass one.