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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:35:26+00:00 2026-05-25T20:35:26+00:00

I have a method that gets the IBOutlet of another class by initializing an

  • 0

I have a method that gets the IBOutlet of another class by initializing an instance to the other class and then runs code that uses the references to the IBOutlets to set a memory address in another app. The code runs fine but is periodically updated by a timer that I set up to refresh every 5 seconds. The problem is that every 5 seconds the memory address is periodically changed to the wrong value and then back to the right value. Here is my essential code:

#define OFF 0
#define ON 1
- (void)onOff:(id)sender {
    if ([[appDelegate buttonOutletName] state] == ON) {
        [helper setIntForAddress:0xFFFFFF value:1];
    }
    if ([[appDelegate buttonOutletName] state] == OFF) {
        [helper setIntForAddress:0xFFFFFF value:0];
    }
}

The problem is that whenever I call this code from anything other than a button press (ex. [self onOff:self]; ) It briefly sets the value to 0 and then back to 1. My code worked fine when implemented inside the application controller; however, now it works but with this error. If anyone could help me that would be greatly appreciated.
Thanks.

  • 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-25T20:35:27+00:00Added an answer on May 25, 2026 at 8:35 pm

    I imagine the method is somehow being called twice. Are you sure you’re only calling it once? Check with the Instruments app to see if it is indeed being called twice.

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

Sidebar

Related Questions

I have a method that gets a list of objects and then returns all
I have a base class that has a method that gets executed by derived
I have a AJAX post method that gets xml data from server. But when
I have a very basic doubt regarding the method that gets executed when app
I have class method that returns a list of employees that I can iterate
I have a method that's about ten lines of code. I want to create
I have a method that gets rows from my database. It looks like this:
I have a method that gets called any time a control on my view
I have a method that gets a SortedMap as input, this map holds many
I have a method that gets data from the data manager. It looks something

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.