Am 12.10.2010 um 23:55 schrieb G S:
> - (UITableViewCell*) tableView:(UITableView*)tableView
> cellForRowAtIndexPath:(NSIndexPath*)indexPath
> {
> UITableViewCell* cell = [tableView
> dequeueReusableCellWithIdentifier:@"MyIdentifier"];
>
> if (cell == nil)
> {
> cell = [[UITableViewCell alloc]
> initWithStyle:UITableViewCellStyleSubtitle
> reuseIdentifier:@"MyIdentifier"];
> cell.selectionStyle = UITableViewCellSelectionStyleNone;
> }
>
> if(indexPath.row < stashes.size())
This if is not needed.
> {
> Stash* pCurrStash = stashes.at(indexPath.row);
Is pCurrStash ever non-nil? Otherwise you get a list that looks empty.
> if(pCurrStash)
> {
> cell.textLabel.text = [NSString
> stringWithUTF8String:pCurrStash->getName().c_str()];
>
> //UIImage* theImage = [UIImage
> imageWithContentsOfFile:path];
> //cell.imageView.image = theImage;
> }
> }
>
> return cell;
> }
>
> I'm not supposed to call reloadData in that function, am I?
No. You would get an infinite loop.
atze
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]