This is the code. It is pretty straight forward. I made two classes one is returning the error and hydrate the iVar of another class (TheView) and show it to the User. however I cant figure it out why the View return Null at all time. Thanks is advance guys.
@interface AccountControllerModel : NSObject {
NSString *anError;
}
@property (nonatomic, retain) NSString *anError;
AccountControllerModel.m
@synthesize anError;
- (void)uploadFailed:(ASIHTTPRequest *)theRequest{
RegistrationViewController *regoVC = [[RegistrationViewController alloc] init];
[regoVC manageTheError:@"THIS IS AN ERROR"];
[regoVC release]; regoVC = nil;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@interface RegistrationViewController : UIViewController {
NSMutableString *test;
}
@property (nonatomic, assign) NSMutableString *test;
@synthesize test;
-(void)viewDidLoad {
test = [[NSMutableString alloc] init];
}
-(void)manageTheError:(NSString *)theError{
self.test = [NSMutableString stringWithFormat:@"%@",theError];
resultOfRegistration.text = [NSString stringWithFormat:@"%@",self.test];
NSLog(@"test is %@",self.resultOfRegistration.text); //It comes back Null
}