• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Query regarding passing the values to the server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Query regarding passing the values to the server


  • Subject: Query regarding passing the values to the server
  • From: "Namrata Dwivedi" <email@hidden>
  • Date: Mon, 11 Sep 2006 17:44:44 +0530

Hi,
I am trying to pass two values (In currency Converter App.) as
arguments to the server but the problem i am facing is the values that
i am getting at my backend are NULL values.
I am sending you the code (.m file) using which i am trying to achieve it.
If you can suggest me something in this code which should be modified
so that values can be passed to the databse or any other piece of code
through which i can do this.


#import "ConverterController.h" #import <Appkit/Appkit.h>

@implementation ConverterController

- (IBAction)convert:(id)sender
{
   int num1,num2,amount;
   num2 =[dollarField floatValue];
   num1 = [rateField floatValue];

   NSNumber *number1 = [NSNumber numberWithInt:num1];
   NSNumber *number2 = [NSNumber numberWithInt:num2];

   NSString* tempurlstring;
   NSString* URLString;
   NSString* resultString;

   NSMutableData *receivedData=nil;
   unsigned char *firstBuffer,*buffer;
   NSURLConnection* theConnection;
   int stringlen;


firstBuffer = buffer;

NSData *Data;

Data = (NSData *)constructXMLRequest:number1:number2;
(void)transmitXMLRequest:Data;

- (NSData *)constructXMLRequest:NSNumber number1:NSNumber number2
{
 NSXMLElement *root = [[NSXMLElement alloc] initWithName:@"Request"];
 [root addAttribute:[NSXMLNode attributeWithName:@"input_1"
stringValue:@"number1"]];
 [root addAttribute:[NSXMLNode attributeWithName:@"input_2"
stringValue:@"number2"]];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: newbie question regarding setting up a master-detail data model with cocoa
  • Next by Date: Reading/Writing Text files
  • Previous by thread: Re: newbie question regarding setting up a master-detail data model with cocoa
  • Next by thread: Reading/Writing Text files
  • Index(es):
    • Date
    • Thread