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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:04:04+00:00 2026-05-24T02:04:04+00:00

My code is something like this: [request setPostValue:employee.empId forKey:@empId]; where employee is a POCO

  • 0

My code is something like this:

[request setPostValue:employee.empId forKey:@"empId"];

where employee is a “POCO” object that has a property empId which is int, but the method is waiting an identifier.

I’ve tried already sending setPostValue:&employee.empId and setPostValue:[employee.empId] but still getting errors.

Can I get the (id) in any way? or must I create another object from the property?

  • 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-24T02:04:04+00:00Added an answer on May 24, 2026 at 2:04 am

    Yeah, you need to create another object from the integer before you can hand it off to a method that’s expecting an id.

    [request setPostValue:[NSNumber numberWithInt:employee.empId] forKey:@"empId"];
    

    Alternatively, with more recent versions of the SDK (post-iOS 6, I think?), you can use Objective-C’s new boxing literals:

    [request setPostValue:@(employee.empId) forKey:@"empId"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code has something like this: HttpFileCollection files Instead of looping through each file
I have a program that simulates mouse click. Code is something like this: [DllImport(user32.dll,
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName
I have a code something like this Enumeration parameterEnum = request.getParameterNames() while(parameterEnum.hasMoreElements()){} what is
I would like to do something like this: if(Request == mainPath) { //code here
I work on code something like this ... HEADERS ... int *var; void child()
I occasionally write code something like this: // file1.cpp #define DO_THIS 1 #if DO_THIS
I often find I want to write code something like this in C#, but
The code goes something like this: protected bool IsOKToSend() { bool IsOK = true;

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.