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 8451277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:11:41+00:00 2026-06-10T11:11:41+00:00

Well this is my code: AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; NSLog(@Row %i

  • 0

Well this is my code:

    AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    NSLog(@"Row %i at View: %@",indexPath.row, [delegate.my_condition objectAtIndex:indexPath.row]);
   if ([@"0" isEqualToString:[delegate.my_condition objectAtIndex:indexPath.row]]){
        NSLog(@"Store is closed");
   } else {
       NSLog(@"Store is open");

and in log I do see:

2012-08-29 22:33:59.434 MyApp[2593:c07] Row 0 at View: 0
2012-08-29 22:33:59.435 MyApp[2593:c07] Store is open
2012-08-29 22:33:59.437 MyApp[2593:c07] Row 1 at View: 0
2012-08-29 22:33:59.438 MyApp[2593:c07] Store is open
2012-08-29 22:33:59.440 MyApp[2593:c07] Row 2 at View: 0
2012-08-29 22:33:59.441 MyApp[2593:c07] Store is open

So I do see that value is 0 but I do not see the if clause but the else clause.

Why is that?

myCondition is NSMutableArray

This is how I add items to my NSMutableArray:

NSString *parsed=[res objectForKey:@"Data"];
    [delegate.my_condition addObject:parsed];
  • 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-06-10T11:11:43+00:00Added an answer on June 10, 2026 at 11:11 am

    Are you sure that the values in delegate.my_condition are strings? Those look like they might be NSNumber*s. And of course an NSNumber* will never be equal to an NSString*.

    You may want to try something like

    if ([[delegate.my_condition objectAtIndex:indexPath.row] intValue] == 0) {
        NSLog(@"Store is closed");
    } // ...
    

    instead, which assumes that the value is either an NSNumber* or an NSString* that represents a number.

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

Sidebar

Related Questions

I don't understand very well this code: var img = $('<img/>', {class: photo, src:
Well ive got this code that creates a table from JSON data. If a
Well I have this code in my Managed C++/Cli in Visual Studio 2008, I
This code works well: UIDatePicker *pickerView = [[UIDatePicker alloc] initWithFrame:pickerFrame]; [pickerView addTarget:self action:@selector(pickerChanged:) forControlEvents:UIControlEventValueChanged];
This code works well for displaying separate xml items in my main.xml. But is
This code seems to work well, modifying the properties of my button, except the
I have this code that works well: {livre:empty_name} $.ajax({ url: sent.php, type: post, dataType:
well, this code fetches the category list and display it in the theme in
I got this code from someone and it works very well, I just want
I'm using this code to extract text from the database and it works well

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.