Get int number from keyboardExample

Hi, i’m pretty newbie on c++ and ios , i’m trying to get an integer number from a keyboard to change a circle size or change a color, i’m trying something like this without having any results.

  
void testApp::setup(){	  
	// register touch events  
	ofRegisterTouchEvents(this);  
	  
	// initialize the accelerometer  
	ofxAccelerometer.setup();  
	  
	//iPhoneAlerts will be sent to this.  
	ofxiPhoneAlerts.addListener(this);  
		  
	keyboard = new ofxiPhoneKeyboard(0,52,320,32);  
	keyboard->setVisible(true);  
	keyboard->setBgColor(255, 255, 255, 255);  
	keyboard->setFontColor(0,0,0, 255);  
	keyboard->setFontSize(26);  
}  
  
  
//--------------------------------------------------------------  
void testApp::update(){  
 val=0;  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){	  
      
    keyboard -> getLabelText()=val;  
      
    ofSetColor(0, 0, 0);  
    ofCircle(100, 100, val);  
      
  
}  
  
//--------------------------------------------------------------  
void testApp::exit(){  
  
}  
  
//--------------------------------------------------------------  
void testApp::touchDown(ofTouchEventArgs &touch){  
	  
	if (touch.id == 1){  
		  
		if(!keyboard->isKeyboardShowing()){  
			keyboard->openKeyboard();  
			keyboard->setVisible(true);  
		} else{  
			keyboard->setVisible(false);  
		}	  
		  
	}  
}  
  

i tried with this and is working now.

  
  
void testApp::draw(){	  
	  
    string a = keyboard -> getText() ; // string a    
  
    int val = ofToInt(a);  
  
    ofBackground(0, 0, val);  
  
    ofCircle(100, 100, val);  
      
      
      
}