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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:37:42+00:00 2026-05-24T22:37:42+00:00

I am working on an abstraction layer for making calls from JavaScript within a

  • 0

I am working on an abstraction layer for making calls from JavaScript within a UIWebView into the native part of my application.

To that end I require a generic mechanism which translates a JavaScript function call into a Objective-C message to an object. This does work pretty well already, except for calling methods on Objective-C objects which require Block-Arguments.

How do I invoke such methods in a generic manner without having to pass NULL as block argument. I’d like to pass a generic block which can then iterate over all arguments passed into it (variable arguments).

To rephrase: Is there any way to generically call any methods with Block-Parameters notwithstanding the specific types of those blocks (i.e. differences in signatures) such that I can capture the arguments passed into those blocks when they are subsequently executed?

  • 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-24T22:37:44+00:00Added an answer on May 24, 2026 at 10:37 pm

    I haven’t tried exactly what you’re doing, but I think I know enough to say, unfortunately, “no”.

    A couple problems are uniting against you here:

    • Blocks are just blocks, and there’s no standard way to get a function pointer out of a block (it can be done, but not in a portable or future-proof way).
    • Even if you had a function pointer, you couldn’t call it with a number of arguments determined at runtime, without using platform-specific assembly. C’s only support for this is using va_args.

    (I hope I’m wrong about this and that someone will correct me, but I’m afraid I’m not.)

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

Sidebar

Related Questions

I'm working on a small platform abstraction layer that I intend to use as
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I'm currently working with an online application that requires multiple screens/steps in order to
I'm working on a library that does some rich text abstraction using Core Text
at my working place (php only) we have a base class for database abstraction.
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project that parses a log of events, and then updates a
I am currently working in Qt and so C++. I am having classes that
I'm working on a PHP web application with PostgreSQL. All of the SQL queries
I have a method in my business logic layer that accepts a stream, which

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.