UIViewerTableViewController.m:15: error: expected identifier before '*' token
- by Aaron Levin
I am new to objective-c programming. I come from a C# background. I am having problems with the following code I am writing for a proof of concept for an iPhone App:
I am getting a number of compile errors but I think they are all due to the first error (could be wrong) - error: expected identifier before '*' token (@synthesize *lists; in the .m file)
I'm not sure why my code is showing up the way it is in the view below the editor..hmm any way, any help would be appreciated.
.m file
//
// Created by Aaron Levin on 4/19/10.
// Copyright 2010 RonStan. All rights reserved.
//
import "UIViewerTableViewController.h"
@implementation UIViewerTableViewController
@synthesize *lists;
@synthesize *icon;
(void)dealloc {
[Lists release];
[super dealloc];
}
pragma mark Table View Methods
//Customize number of rows in table view
(NSInteger)tableView:(UITableView *) tableView numberOfRowsInSection: (NSInteger) section{
return self.Lists.Count;
}
//Customize the appearence of table view cells
(UITableViewCell *) tableView(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *) indexPath{
static NSString *CellIdentifier = @"Cell";
UITableView *Cell = [tablevView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil){
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = [[self.Lists objectAtIndex:indexPath.row] retain];
cell.imageView = self.Icon;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
@end
.h file
//
// UIMyCardsTableViewController.h
// MCS ProtoType v0.1
//
// Created by Aaron Levin on 4/19/10.
// Copyright 2010 RonStan. All rights reserved.
//
import
@interface UIViewerTableViewController : UITableViewController {
NSArray *lists;
UIImage *icon;
}
@property (nonatomic,retain) NSArray *lists;
@property (nonatomic,retain) UIImage *icon;
@end