loading some html into an iOS browser control

Dar Scott dsc at swcp.com
Mon Apr 16 15:45:24 EDT 2012


Terry, I considered using this control to solve a problem for a customer but have yet to work with this.  You have to consider that caveat with my comments.

I think the HTMLtext has to be a full page with <html> tag and everything.  

I have also heard that Apple is going with stricter standards compliance with iOS 5.0 or 5.1 (perhaps for security reasons) and what might work in some browsers might not work as HTMLtext.  

I would think this should work with an empty baseURL, but you might want to try putting something in there.

If you have defined browserLoadRequest, you might need to pass that even for "load" (based on a comment I have seen online concerning the underlying method "loadHtmlString").  I'm not sure what the URL or type passed to browserLoadRequest would be for "load".  

You might get some debug info by defining handlers for the messages sent by the control and seeing which if any are called for "load".  Log all parameters.  At minimum define browserLoadFailed.  (I don't really know if "load" will cause these to be sent, but I think so.)

You might be able to learn more from UIWebView documentation and even some examples.  Even if you are not familiar with Objective C, you might get a clue such as a test script that works.  

Like I said, this is just what I learned in preparation for using this, and then I did not.  

Dar


On Apr 16, 2012, at 12:23 AM, Terry Judd wrote:

> 
> On 16/04/2012, at 04:07 PM, Dar Scott wrote:
> 
> 
> On Apr 15, 2012, at 5:51 PM, Terry Judd wrote:
> 
> I'm passing empty as the baseURL (I'm not sure what this is for anyway) and have tried passing simple and complex chunks of html without success. Has anyone got this to work (Livecode 5.5)? The browser object seems to function fine otherwise as I can load a url in it no problems.
> 
> The baseURL is for handling relative URL and image references in the HTMLtext.
> 
> Dar
> 
> Now that you've explained it it makes perfect sense. That's one part of the puzzle solved - thanks!
> 
> Terry...
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> Dr Terry Judd
> Senior Lecturer in Medical Education
> Medical Eduction Unit
> Faculty of Medicine, Dentistry & Health Sciences
> The University of Melbourne
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list