Pierre, 

Nice!!!

Also being able send a message from the browser to the app would be sweet. I 
have a html map. When you tap on a county a pick list of options is displayed. 
The java reloads the page and puts the x/y location in the url parameters. The 
app gets the page load message and retrieves the x/y from the url and presents 
the appropriate pick list. The page retreat is a little tricky though. Instead 
of that 3 ring circus a way to send a message directly to the app from some 
sort of java deal would be a nice feature. I don't know if this is even 
possible. 

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net




<div>-------- Original message --------</div><div>From: Pierre Sahores 
<s...@sahores-conseil.com> </div><div>Date:04/23/2015  16:14  (GMT-05:00) 
</div><div>To: How to use LiveCode <use-livecode@lists.runrev.com>,LiveCode 
Developer List <livecode-...@lists.runrev.com> </div><div>Subject: Re: 
mobileControlDo </div><div>
</div>Hi Mark,

Many thanks for your helpful guidance !

Understood : mobileControlDo returns the last line of the executed javascript « 
as this » , so all works as expected with :

on mouseup
      -- mobileControlCreate "browser", "Browser1" inited in the preOpenStack 
handler --
      MobileControlDo "Browser1", "execute", fld « javascript"
      answer the result — success --
end mouseup

the « javascript » fld contents :

window.name = Number(window.name) +1;
window.name; // correct statement

OK !

While my previous mistake was to write this, instead :

window.name = Number(window.name) +1;
return window.name; // erroneous statement 

KO !

Conclusion : mobileControlDo acts perfectly well to let us store and exchange 
persistant data between the mobile browser and LC (iOS and Android successfully 
tested).

Warm Regards,

Pierre


> Le 22 avr. 2015 à 17:46, Mark Waddingham <m...@livecode.com> a écrit :
> 
> Hi Pierre,
> 
> There is definitely code in the engine to feed the (string) result from the 
> JS script back to 'the result' variable. I've just tried (on iOS):
> 
> mobileControlDo sBrowserId, "execute", "1+1"
> answer the result
> 
> For me at least, this results in an answer dialog popping up containing the 
> value '2'.
> 
> If you can't get this to work, then please do file a bug in the quality 
> center with your example script and more details of your environment.
> 
> Warmest Regards,
> 
> Mark.
> 
> ---
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> On 2015-04-21 17:42, Pierre Sahores wrote:
>> Hi Friends,
>> I can’t find any way to get the returned value (nor as it or the
>> result) after executing the following line of code :
>> "Browser1", "execute", fld  "js1"
>> where fld « js1" acts as a simple javascript statements container.
>> Do i miss something or is the mobileControlDo command 100% unable to
>> let us use its execution result ?
>> A simple js « alert() » box display (witch works…) don’t feet my needs...
>> Thanks for any though…
>> Best,
>> --
>> Pierre Sahores
>> mobile : 06 03 95 77 70
>> www.sahores-conseil.com
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com


_______________________________________________
livecode-dev mailing list
livecode-...@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/livecode-dev
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to