MobGUI, what am I doing wrong?

Geoff Canyon gcanyon at gmail.com
Thu Apr 5 09:20:08 EDT 2012


I have a field object, a button object, and a browser object. If the button
script is this, it works as expected:

*on* touchEnd pId

   mobGUIUntouch the long id of me

   *put* the uText of *group* "URL" into tURL

   *if* char 1 to 7 of tURL is not "http://" *then* *put* "http://" beforetURL

   iPhoneControlSet gBrowserA["browser"],"url",tURL

*end* touchEnd

But I also have a card script of:

*on* setURL tURL

      iPhoneControlSet gBrowserA["browser"],"url",tURL

*end* setURL

and if I change the button scrip to this, it fails:

*on* touchEnd pId

   mobGUIUntouch the long id of me

   *put* the uText of *group* "URL" into tURL

   *if* char 1 to 7 of tURL is not "http://" *then* *put* "http://" beforetURL

   setURL tURL

*end* touchEnd

I've tried inserting

      *put* tURL into fld "test"

into both scripts, and it seems to be working. Is there a way I can debug
this within LC? Given the way browser objects are handled I've only been
testing in the simulator.



More information about the use-livecode mailing list