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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:01:39+00:00 2026-05-26T12:01:39+00:00

I have a static callback function which is supposed to set an NSString and

  • 0

I have a static callback function which is supposed to set an NSString and then call an updateLabelWithString: type function over in another file.

How do I get a reference to that file (my AppDelegate, if that helps) from within my static c++ function?

  • 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-26T12:01:40+00:00Added an answer on May 26, 2026 at 12:01 pm

    You have to have a reference to that object. You could set a static global and stash the reference into that, prior to your static method being called.

    First though, I’d try to just use [[UIApplication sharedApplication] delegate]. You can call Objective-C methods from static C functions. Not sure if this works from C++ though.

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

Sidebar

Related Questions

I have a class, in which i declare a static function. I register this
In C I have a function which registers a callback and a state object
I have a LRESULT CALLBACK function in a header file(hook.h) that I both forward
I have a callback function for another function that loops through the comments of
Here I create a class in JAVA in which I have function (callback) which
I have a C++ DLL which I give a pointer to a static function
I have a static function callback : static SCDynamicStoreCallBack callback( [params] ){ ... }
I intended to create a class which only have static members and static functions.
We have a C++/CLI class, let us call it class A, from which we
I have a native api function which looks like: DWORD WINAPI WlanRegisterNotification( __in HANDLE

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.