From: Davide V. <var...@ya...> - 2006-02-24 12:35:59
|
Hi Jonathan --- Jonathan Paisley <jp...@dc...> wrote: > On 23 Feb 2006, at 22:35, Davide Varvello wrote: > > > I know the channel id for ftp on my device is 9, > puts > > connectResult > > displays 0, but puts sendResult shows -21875 (i.e > > busy) and of course, > > no picture is sent to the device. > > Do you understand this behavior? > > That error number is kOBEXSessionBusyError (see > /System/Library/ > Frameworks/IOBluetooth.framework/Headers/OBEX.h). yep > I think the problem is that the the OBEX methods are > asynchronous - > you have to set them going then wait for the > callback method on the > delegate. See the documentation for > [OBEXFileTransferServices > setDelegate:]. right > The reason progress is not made even though you have > 'sleep' in your > code is that the Cocoa event loop doesn't get a > chance to run. Try > setting up a delegate object and initiating the > session, then kick > off the event loop with > NSApplication.sharedApplication.run. hmm, as I never code in objective-c before, I don't know exactly what NSApplication.sharedApplication.run should do, but I'll read the documentation and feedback you. Thanks Davide __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |