Re: NSURLConnection doesn't post

2008-04-12 Thread Matt Burnett
It depends what you mean by 'running'. You could always use runMode:beforeDate instead of run to do things in the thread while the loop is running. On Apr 11, 2008, at 10:32 PM, David Wilson wrote: you can't have a run loop magically running in your thread while you're doing other things

Re: NSURLConnection doesn't post

2008-04-11 Thread Matt Burnett
Are you calling test: or sendLogs in a thread which doesnt have a active run loop, or a thread that will soon terminate? Either one will cause issues for NSURLConnections. On Apr 10, 2008, at 7:27 AM, Micha Fuhrmann wrote: Hi there, I'm running into a problem with NSURLConnection and I

Re: NSURLConnection doesn't post

2008-04-11 Thread Micha Fuhrmann
Tom, thanks for your reply. from my understanding in my case the Object that's initiated the NSURLConnection is my shared instance since the call comes from the outside through the - (IBAction)test:(id)sender that then initiates the NSURLConnection with sendLogs. So if an object calls

Re: NSURLConnection doesn't post

2008-04-11 Thread Micha Fuhrmann
Ok, I've used - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait and it's fine one, you've pointed t what was wrong, however I thought that because the method sendLogs was invoqued by an instance that is alive during the whole app lifetime it

Re: NSURLConnection doesn't post

2008-04-11 Thread Jean-Daniel Dupas
Le 11 avr. 08 à 19:14, Tom Harrington a écrit : On Fri, Apr 11, 2008 at 3:53 AM, Micha Fuhrmann [EMAIL PROTECTED] wrote: Ok, I've used - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait and it's fine one, you've pointed t what was wrong, however I

Re: NSURLConnection doesn't post

2008-04-11 Thread David Wilson
On Fri, Apr 11, 2008 at 1:32 PM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: NSRunloop documentation disagree: In general, your application does not need to either create or explicitly manage NSRunLoop objects. Each NSThread object, including the application's main thread, has an NSRunLoop

Re: NSURLConnection doesn't post

2008-04-10 Thread Michael Vannorsdel
Maybe a shot in the dark, but setting self as delegate, are you sure self is the correct object if called from other objects (self is not the calling object)? On Apr 10, 2008, at 6:27 AM, Micha Fuhrmann wrote: Now if I place a button on my interface and call test everything is fine, the

Re: NSURLConnection doesn't post

2008-04-10 Thread Michael Vannorsdel
Also, this method may be called multiple times with only a fragment of the data each time. On Apr 10, 2008, at 6:27 AM, Micha Fuhrmann wrote: - (void)connection:(NSURLConnection *)connection didReceiveData: (NSData *)data { NSString* thhhe = [[NSString alloc]initWithData:data

Re: NSURLConnection doesn't post

2008-04-10 Thread Micha Fuhrmann
Yes, I've tried that too, I've set the delegate to be my shared instance. Micha On 10 avr. 08, at 15:57, Michael Vannorsdel wrote: Maybe a shot in the dark, but setting self as delegate, are you sure self is the correct object if called from other objects (self is not the calling object)?

Re: NSURLConnection doesn't post

2008-04-10 Thread Micha Fuhrmann
Correct, however it doesn't get called even once, the only answer I've set from the server right now is an OK string. Micha On 10 avr. 08, at 15:59, Michael Vannorsdel wrote: Also, this method may be called multiple times with only a fragment of the data each time. On Apr 10, 2008, at

Re: NSURLConnection doesn't post

2008-04-10 Thread Tom Harrington
On Thu, Apr 10, 2008 at 6:27 AM, Micha Fuhrmann [EMAIL PROTECTED] wrote: Now if I place a button on my interface and call test everything is fine, the post is submitted and the delegate method is called. Suffice I call the test method from another class and nothing gets posted (break points