I have created a class where I have a method to make a URL connection and perform some processing. In my view controller I’m sending a message to this method:
- (IBAction)loadInfoButton:(id)sender {
LoadInfo *loadInfo;
responseText.text = @"Talking to the server...";
int ret = [loadInfo talkToServer];
if(ret==1)
responseText.text = @"Connection successful.";
else
responseText.text = @"Connection failed.";
}
It looks like that the execution does not reach the called method. I kept a NSLog in the method talktoServer and it does not show up. I also made a breakpoint at the line int ret = … and I was not able to get into the execution of that method.
I have done calling methods from my customized classes before and such a thing did not happen. I’m fairly new to the iOS development world and appreciate your comment on the issue.
Thanks!
This line:
creates a pointer, but no object. In addition to the pointer, you must allocate and initialize the object, e.g.