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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:05:12+00:00 2026-05-22T15:05:12+00:00

I got a tableview with guests(VM’s) which i can turn on/off/reboot, this works perfectly

  • 0

I got a tableview with guests(VM’s) which i can turn on/off/reboot, this works perfectly when i do it on 1 Guest.. but when i try to do in 2+ guests at the same time the table responds very bad and the app crashes when i try to do something, what it basicly does is when i click on a row i get the choose what i want to do with it turn in on/off or reboot. i have got an NSTimer which checks every second if the VM has been succesfully completed in the function it self i got the variable selectedindexPathForTheGuest so the row updates itself when its completed but as i say when i try to do 2 or more at the sametime this variable gets overwritten by the last rowindexnumber that i call.. so then when a task is completed is updates the last selected row instead of the row it supposes to..

How can i prefent this from doing so?

(im probally making a beginner mistake as im actualy an beginner..)

  • 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-22T15:05:13+00:00Added an answer on May 22, 2026 at 3:05 pm

    You should look into the delegate Pattern instead of setting a variable.

    Maybe something like this would work for you

    • When the user selects an action
      launch a new thread to perform it
    • The
      new thread monitors the activity of
      the selected VM
    • When the VM finishes
      the action you can call [tableView
      reloadData]
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a tableview containing array of names. The search bar works perfectly filtering
I got this error twice. it says error: redefinition of '-[SampleTableViewController tableView:cellForRowAtIndexPath:]'
I've got a document based App using Core Data, and have a tableView which
i've got a tableview. inside this, i have a tableviewcell with a horizontal scrollview
Has anyone got any tips for this problem i'm facing. Its not complex, but
I'm building an app that contains an UITableview. I got tableview to work perfectly
I've got a tableView in a view which is a subview to my MainViewController.
I've got a problem that I think is probably straight forward but I can't
I've got an NSSplitView and on the left side I've got a tableView (like
I got more of a general question. Instead of a tableview I have a

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.