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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:06:28+00:00 2026-05-31T14:06:28+00:00

I have this delegate method below that is setting a few fields in my

  • 0

I have this delegate method below that is setting a few fields in my tableview. What happens is when one of the tableview cells is pressed it loads a subview with a bunch more tableview cells when one is selected is pops the view from the viewcontrollerand loads the value that was selected into the parentviews cell that was initially selected.

This main cell effects what I am able to set in the second cell. so when it is clicked it shows data related to the first selection.

I am enabling my user to go back to any of the cells to change their selection.. or maybe they might go back thinking they want to change but don’t.

In which case for the second tableviewcell of my parentview will either need to change if the first cell changes or stay the same if the value of the first cell dosnt change.

I have this delegate that is used with the first cell, and it is where I am trying to control the value of the secondcell, as shown below.

- (void) setManufactureSearchFields:(NSArray *)arrayValues withIndexPath:(NSIndexPath *)myIndexPath
{
    manufactureSearchObjectString = [[arrayValues valueForKey:@"MANUFACTURER"] objectAtIndex:0];
    manufactureIdString = [[arrayValues valueForKey:@"MANUFACTURERID"] objectAtIndex:0]; //Restricts Models dataset
    manufactureResultIndexPath = myIndexPath;
    [self.tableView reloadData]; //reloads the tabels so you can see the value in the tableViewCell.
    //need some sort of if statment here so that if the back button is pressed modelSearchObjectString is not changed..

    if (oldManufactureSearchObjectString != manufactureSearchObjectString) {
        modelResultIndexPath = NULL;
        modelSearchObjectString = @"empty";
        oldManufactureSearchObjectString = manufactureSearchObjectString;
    }
}

The thing being is that it enters the if statment every time even if the same cell is selected for the first cell.. (in which case is should not enter the if statement.

I thought I could do this by checking oldMan vrs man if != then go through and set the second cell stuff and then pass man to oldMan so next time you use the first cell it has a value to comapre against. but obviously this dosn’t seem to be working. Is my logic bad or is it something in my code.

this is how I set these values in .h they are all @synthesised

//...
NSString *manufactureSearchObjectString;
    NSString *oldManufactureSearchObjectString;
    NSString *manufactureIdString;
    NSIndexPath *manufactureResultIndexPath;
//...

@property (copy) NSString *manufactureSearchObjectString;
@property (copy) NSString *oldManufactureSearchObjectString;
@property (copy) NSString *manufactureIdString;
@property (copy) NSIndexPath *manufactureResultIndexPath;
//...
  • 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-31T14:06:30+00:00Added an answer on May 31, 2026 at 2:06 pm

    You have to compare the value of the NSStrings as below:

    BOOL isEqual = [aString isEqualToString:bString]; // provide aString and bString
    if (!isEqual)
    {
        // code
    }
    

    What you’ve done is to compare the pointers, which can be different for strings of the same value.

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

Sidebar

Related Questions

I have this method: private delegate void watcherReader(StreamReader sr); private void watchProc(StreamReader sr) {
Let's say I have this method: public static object CallMethod(Delegate method, params object[] args)
I have this delegate in C#. public delegate string ACSharpDelegate(string message); How would I
I have this code: UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:@Illustrations delegate:self cancelButtonTitle:@Cancel destructiveButtonTitle:nil otherButtonTitles:
Right now, I have to do this private delegate void set(int obj); //declare the
I have this code in jQuery, that I want to reimplement with the prototype
I have a NSMutableArray of QuoteMap objects. When I add one using the below
I've ran into a puzzling issue: I have only one method defined for inserting
I have developed a application where i have a method that used managed object
I'm struggling with the code below. I have a method Find, which for me

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.