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

  • Home
  • SEARCH
  • 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 957245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:40:18+00:00 2026-05-16T00:40:18+00:00

Hopefully I’ll get some help here. Basic setup is this: My application swaps out

  • 0

Hopefully I’ll get some help here.

Basic setup is this: My application swaps out the current Main View of the Main Window each time I want to switch to a new view. Why? Because I wanted to use a SplitView further on in the program (what’s displayed in the SplitView depends on what’s been selected before it).

What happens is the application reads in information from a text file, and populates a UITableView (1) with that information. The user then selects a cell, and clicks “next”. The main window then ditches the previous table view, and creates a SplitView, which has a UITableView (2) as its root view, and another UITableView (3) as its detail view.

So, I’ve gotten the reading-in-from-file part working, as well as updating the detail view (3) to show an initalized view based on what was chosen in the original UITableView (1). However, I can’t get the root view (2) to properly display options chosen from the original view (1).

What I do is I have the Main Window pull out the string that contains a file-name base from the original view (1), and feed the line to the Root View(2) of the SplitView. This root view then reads in the data from file, parses it accordingly (All data structures are being intialized, and functioning properly, I’ve checked), and then sends the first item to the DetailView (3) to be displayed. However, the root view itself remains blank, even though I updated the NSMutableArray it uses as a data source appropriately, and then called [controller.tableView reloadData].

Everything is properly hooked up in the .xib file as well. Does anyone have some tips that I can get?

Sorry for the lack of code, but the code is on a secured computer, meaning no ‘net access. I can describe any code you want if you ask.

  • 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-16T00:40:19+00:00Added an answer on May 16, 2026 at 12:40 am

    Usually, a blank table is cause by returning an incorrect value from: – numberOfSectionsInTableView: or – tableView:numberOfRowsInSection: .

    The table thinks it has no rows so it never displays them.


    Update:

    After making the array retain itself, it started working, but only
    after I stopped using [array count]
    for the number of rows in section. I
    have no idea why [array count] would
    cause an error (An EXC_BAD_ACCESS
    error no less) when I has just
    outputted the contents of the array
    through NSLog just a second ago

    When you have sections, you have a nested data structure. The top or outer structure defines the sections and each section’s lower or inner structure defines the rows for that section. If you return the count of the outer structure for the inner or vice versa you will get a crash because the table has the wrong number of rows or sections.

    Suppose you have an array called “departments” wherein each element is a dictionary that looks like:

    Department{
        (key = value)
        name = "Engineering";
        employees = ["Steve","Bob","Ted"];
    }
    

    To display this as a table you would return:

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
        return [departments count];
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
        NSArray *tmpEmployees= [[departments objectAtIndex:section] valueForKey:@"employees"];
        return [tmpEmployees count];
    

    The important thing is to return the proper count for the proper part of the data structure.
    }

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

Sidebar

Related Questions

Hopefully somebody can help me out here. I'm working within an embedded ActionScript2 and
Hopefully someone here can help me out - basically I have a logging class
Hopefully somebody can help me out here. I have a UIView with 3 text
Hopefully some SQL replication genius can help on this one. We've got some handheld
hopefully you can help me with this issue. I've grabbed the basic login button
Hopefully some clever lad or ladette can help me figure out the logic for
Hopefully there are some WCF wizards out there that can spot my mistake here.
Hopefully someone can help here, it's incredibly frustrating! I have a couple of iOS
Hopefully someone knows the answer to this Java-Certification question: public static void main(String[] args)
Hopefully someone here can help me! I'm trying to set up fancybox so when

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.