Welcome, Guest
Username Password: Remember me

Clearing cell data
(1 viewing) (1) Guest

TOPIC: Clearing cell data

Clearing cell data 1 year, 7 months ago #1

Hey guys!

I have a STV with a few SCTextFieldCells and a couple of SCDateCells. I want to be able to have the user clear all of the fields (including the date fields). I have created a SCLabelCell with the label "Clear All Cells" and am using didSelectRowAtIndexPath to detect when the user taps it.

I have a custom object named Profile that is my bound object.

I tried setting the values in the Profile to blank/nil and using [_tableView reloadData], but it isn't updating the cells.

What is the proper way to do this?

Thanks for the great product! It is saving me a ton of boring, tedious work!

- Tommy
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5

Re: Clearing cell data 1 year, 7 months ago #2

Hi Tommy:

Thanks a lot for the nice words

That's the first time someone uses Sensible TableView in that way We'll need to do some modifications on STV so that it would reflect any changes that happen to its bound object upon calling [UITableView reloadData]. Up till now, Sensible TableView always expected to be the only one to modify its bound object, and that's why it's not updating itself properly on reloadData.

You should have the new update in about 10 days. Will this be ok with your current schedule? Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: Clearing cell data 1 year, 7 months ago #3

Yes, that would be great! Thanks
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5

Re: Clearing cell data 1 year, 7 months ago #4

I am revisiting this topic because I am having the same issue with SCNumericTextFieldCells and SCTextFieldCells. I can set the SCTextFieldCell to @" " and it will clear, but I would think it should respond/update if the field in the boundObject is also set to nil.

It would also be nice to have a property for SCNumericTextField that will display a blank instead of a 0 when the value is 0. Something like displaysBlankWhenZero.

The SCDateFieldCells are, however, working as expected after the update you sent me.

I have attached a test project.

Thanks!
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5

Re: Clearing cell data 1 year, 7 months ago #5

Thanks a lot for your input Tommy. I think the property you're suggesting is really useful and we'll definitely implement it.

As for clearing the cells, it is now part of our next release, due in a few days. The release is pending some tests and some minor feature requests. I'll keep you posted as soon as it's available. Thanks again!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: Clearing cell data 1 year, 7 months ago #6

Great to hear! Thanks Tarek.
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5
Time to create page: 0.96 seconds