Re: POSTing into a server from COCOA
Re: POSTing into a server from COCOA
- Subject: Re: POSTing into a server from COCOA
- From: Spencer Salazar <email@hidden>
- Date: Thu, 14 Sep 2006 01:30:57 -0400
Hey there,
On Sep 14, 2006, at 1:12 AM, deepak gopal wrote:
These are the steps I follow:
1) NSString *urlString = [NSString stringWithCString:"http://
172.19.23.36:8080/Mul/servlet/first"
];
[...]
The tool gives a warning in the first step saying that selector
[NSString stringWithCString] is not recognised. Its the same
warning for all the NSString methods.
A "selector not recognized" warning is for most intents and purposes
actually an error (its due to the dynamic nature of Objective-C that
its just a warning). I think stringWithCString: was deprecated and
then removed. NSString does have a stringWithCString:encoding:
selector, but what I think you are really looking for is this:
NSString *urlString = @"http://172.19.23.36:8080/Mul/servlet/first";
Cocoa basically has an agreement with the compiler that says every
time you put a @ before a c-string, the compiler will transform the C
string into a valid and appropriately formed NSString *. I cant tell
if there are other problems with your code, but that should get you a
little closer at least.
spencer
_______________________________________________
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