On Nov 17, 2010, at 13:33, Geoffrey Holden wrote:

> I've written an app for the Mac (which runs rather nicely) and now I'm trying 
> to port it to iOS (where it won't run at all).  The particular line of code 
> which is causing a problem is this:
> 
>       [webView stringByEvaluatingJavaScriptFromString:cmdStr]; 
> 
> cmdStr contains the following: 
> rcs.invoke(dojo.fromJson('{"pw":"password","type":"signIn","email":"geoff.hol...@45rpmsoftware.com"}'));
> 
> I'm using the JSON framework on Google code 
> (http://code.google.com/p/json-framework/), which (I'm assured) is iOS 
> compatible.  It certainly builds without trouble.  
> 
> The error I get when this line (fails to) execute is:
> 
> void SendDelegateMessage(NSInvocation*): delegate (webViewDidLayout:) failed 
> to return after waiting 10 seconds. main run loop mode: 
> GSEventReceiveRunLoopMode
> 
> I have got webViewDidFinishLoad (that's where this code is called) - so it 
> isn't that it's trying to run on nothing.
> 
> If you have any ideas about what I could do to fix this, I'd be most 
> interested to hear them!

Must be something with the JSON framework, maybe the syntax is incorrect, 
because I just started using a WebView with 
stringByEvaluatingJavaScriptFromString: and it works flawlessly like the 
WebView for OS X. In my case, the code I execute is much simpler, things like 
"document.forms[0].user.value=\"%...@\". No problem with this kind of scripting 
but, like I said, it's very basic...

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin                                 
http://www.nemesys-soft.com/
Logiciels Nemesys Software                                              
laur...@nemesys-soft.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to