Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:44:13+00:00 2026-05-30T18:44:13+00:00

In my app I’m using ELCTextfieldCell . The idea is to use the data

  • 0

In my app I’m using ELCTextfieldCell. The idea is to use the data entered by the user for some calculations. But there is the problem. I have about 14 cells and, of course, they can’t all fit on a screen. So when I click OK the app is checking if all fiels are filled in:

BOOL complete = YES;
for (int i = 0; i < [cellTextArray count] - [self.numberOfBools intValue]; i++) {
    NSIndexPath *iPath = [NSIndexPath indexPathForRow:i inSection:0];
    ELCTextfieldCell *theCell = (ELCTextfieldCell *)[self.tableView cellForRowAtIndexPath:iPath];
    if (!theCell.rightTextField.text)
        complete = NO;
}

This code works perfectly if all the cells are visible, but if some are out, then the complete becomes NO. The output of theCell in gdb is:

(gdb) po theCell
Can't print the description of a NIL object.

Can somebody push me in a right direction please? 🙂

All help will be appreciated, thank you.

EDIT

self.numberOfBools is just an NSNumber with total of bools in these rows. They are using UISwitches, not UITextField as the other cells, so I excluded them from the check.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:44:14+00:00Added an answer on May 30, 2026 at 6:44 pm

    Complete needs to be calculated on the data that is backing the cells rather than on the cells themselves. Let me explain.

    The cell is a visual representation of your data and when it is not in view the run-time will release it and that is why it is nil.

    However cellForRowAtIndexPath: creates the cell from data right? (or it is normal to do so) so when the user updates the cell.rightTextField you should update data.rightTextField and then complete should be looking something akin to … and this is pseudocode not compilable

    complete = YES;
    for (Data* data in myDataSet) {
        if (!data.rightTextField)
            complete = NO;
    }
    

    So, in summary cells represent data and they are not guaranteed to persist. You yourself can ensure the data is persisted; therefore test for completeness on the data and not on the cells.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App runs on simulator on my MacBook Air, but not on iMac. I have
App Store We have been developing an app for quite some time now for
My app will have no user interface at all (exept for notifications) except for
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
An app I'm writing always crashes on a clients computer, but I don't get
Our app (already deployed) is using an Access/Jet database. The upcoming version of our
My app (winforms .net 2.0 / vs2008) works fine on my dev machine but
The app I'm working on is relatively simple but it is throwing memory warnings.
My app allows users to have custom subdomains, as in user1.domain.com. I am integrating
my app has a submit feedback form. Is there a way to can capture

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.