Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

asifpv

macrumors newbie
Original poster
Apr 13, 2009
11
0
Hi Friends,

i am not able to set the property values from another class.

Please see my code,
-------------------------------
----- FNController.m -------
Am calling below method from FNView.xib, after submitting save button

-(void) save_Clickedid)sender {

NSString* fname = self.tFirstName.text;
NSString* lname = self.tLastName.text;

AddViewController *avcObj = [[AddViewController alloc] init];

[avcObj setTxtNameLabel:fname :lname];

[self.navigationController dismissModalViewControllerAnimated:YES];
// Navigating to AddView.xib
}


here is am setting the properties
---- AddViewController.m----


- (void) setTxtNameLabelNSString *)fn: (NSString *)ln{

self.txtFirstName.text = fn;

self.txtLastName.text = ln;

NSString* name = [[fn stringByAppendingString:mad:" "] stringByAppendingString:ln];

int intVal = name.length;

if(intVal == 0)
self.txtName.text = @"No name";
else
self.txtName.text = name;

}


after doing this my UILabel (ie.txtName) not getting updated..but when i debug the program am able to get the value in "name" hence it going to else part of the if statement.

Anyone knowing please help me to do this...

Thanks,
Asif
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.