Jump to content
InsanelyMac Forum
Sign in to follow this  
LooN3y

How Can I Make Parsed XML Data Appear On Custom TableViewCell?

Recommended Posts

I'm making a split view iPad product search.

 

 

 

in the debugger, it shows I'm getting the parsed data, it just won't show up on my table view, so i decided to make a custom TableViewCell creating the .h and .m files.

 

 

but i have a problem, i have my XML parser in my MasterViewController, but i want to assign it to a label in my Custom TableViewCell object.

 

 

- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
 namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
NSLog (@"didEndElement");

if ([elementName isEqualToString:@"description"])
{
	NSLog(@" decription:%@", capturedCharacters);




   StyleMasterCell.textView.text =  capturedCharacters;



}

capturedCharacters = nil;  

if ([elementName isEqualToString:@"str_smartsearch"])
{
	// We are no longer in an item element
   inItemElement = NO;
}
}

 

 

 

i only included description so it will be simple, and I wanna just at least get one thing working first and foremost.

 

 

 

 

this line: StyleMasterCell.textView.text = capturedCharacters;

 

 

does not work, how can i assign the parsed at a to the textView thats in the stylemastercell?

Share this post


Link to post
Share on other sites
Advertisement

Assuming the capturedCharacters isn't NULL (you should be able to tell based on the NSLog you have there above it) , you should be using

 [cell textLabel] setText:@"Foo Bar"];

Try that out and see how it works out for you. (My suggestion would be to use an NSDictionary since it makes assigning key values to cells easy)

 

example

 

Screen%20Shot%202012-05-10%20at%2010.58.14%20PM.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



×