This line:
theObject.value = 5;
Will not work, because you are setting a property that represents an NSNumber with an integer. Try this instead to see if it fixes your issue:
theObject.value = [NSNumber numberWithInteger:5];
You seem to have some other issues with how you are implementing KVO, but it looks like the above will fix the problem you are describing in this question.