Re: browser widget again

2016-06-15 Thread Mike Bonner
Well, my theory is shot down.. however.. I think in your code, in order to get the same behavior you already seem to be getting, but on purpose..(Which I still don't understand why its doing what it is..) You might be able to change your html code to this tcoord = liveCode.inputLoc(results[0].

Re: browser widget again

2016-06-15 Thread Jacques Hausser
And I forgot: yes, the messageWatcher gives successive “inputLoc and the time when I click successive points on the map. > Le 16 juin 2016 à 00:55, Jacques Hausser a écrit : > > In my html file, tCoord is declared (together with several other variables) > before the first function initialize

Re: browser widget again

2016-06-15 Thread Jacques Hausser
In my html file, tCoord is declared (together with several other variables) before the first function initialize() . In the function initialize() I set the map, I create an elevation service (for the altitude) and a listener to catch the clicks on the map. Then I have a function retrieving the l

Re: browser widget again

2016-06-15 Thread Mike Bonner
Hey, when the var tcoord is declared and/or set its value, how do you do it? If you bring up the message watcher, after grabbing your return value it once, does it continue spamming your livecode handler? I have the inkling of a theory.. On Wed, Jun 15, 2016 at 1:41 PM, Mike Bonner wrote: > No

Re: browser widget again

2016-06-15 Thread Mike Bonner
Not sure I understand whats going on either, I'd probably have to see more code. @david.. I don't have time to try it right now, but I _THINK_ if you have an existing function in your page and you want to get the results of that function out, you can treat the function as a parameter to your livec

Re: browser widget again

2016-06-15 Thread Jacques Hausser
YESSS ! IT WORKS ! Many thanks, Mike ! But I’m very surprised: I don’t have to call my command “getLoc” more than one time: after that, each time I change the location of my marker on the map, the value of tCoord (which is declared at the start of the script, that is, as “global”) is modified,

Re: browser widget again

2016-06-15 Thread David Bovill
I have the same sort of problem. It seems that calling javascript from Livecode with "do someFunction in browser" does not return anything even if the Javascript function does return a value? Or maybe the returned value needs to be of a certain type? If you write javascript that calls Livecode I t

Re: browser widget again

2016-06-15 Thread Mike Bonner
You said tcoord contains the information you want to return... I don't think you need to actually include the livecode function call in your html, I'm pretty sure you can remove it entirely and do something like this.. do "liveCode.inputLoc(tcoord)" in widget "Browser" and it will work. (It did

browser widget again

2016-06-15 Thread Jacques Hausser
Still trying to use the browser widget and its javascripthandlers. I picked information here and there (many thanks to those who answered my previous mails, especially Mike) but really I would be glad to find a detailed user’s guide somewhere. I’m using a html file exploiting google map’s API as