0
숫자 서식 지정자가있는 텍스트 필드 인 "_currentField"의 값이 1000 이상일 때마다 ("패널"인) "_congrats"를 표시하고 1000 이상 나는 "_errormsg"(다른위원회)를 나타나기 바란다. 어떤 값을 입력 할 때마다 팝업되는 것은 "_errormsg"입니다. 내가 도대체 뭘 잘못하고있는 겁니까?문이 제대로 작동하지 않는 경우
- (void)onTimer:(NSTimer*)aTimer {
if ([_currentField.stringValue integerValue] >= 1000)
{
[_congrats orderFront:(id)self];
[_progIndicator stopAnimation:(id)self];
}
else {
[_errormsg orderFront:(id)self];
[_progIndicator stopAnimation:(id)self];
}
}
어떤 클래스가 currentField입니까? –
죄송합니다! 나는 그것을 언급해야한다. 그것의 텍스트 필드. – Johnny
번호는 어떻게 입력합니까? 예를 들어 쉼표로 '1,000'으로 입력 된 경우 파서는이 숫자를 고려하기에 충분히 똑똑하지 않고 0을 반환합니다. –