Front and Back Scripts on Mobile

Ralph DiMola rdimola at evergreeninfo.net
Tue Jul 5 19:42:46 EDT 2016


Thanks J! Yes exactly. I do all my coding around the LC field. When the user
enters data in the native field I then move it to the LC field and work on
it there. This allows IDE testing. Then when you start up the app set the
visible of the LC field to true if in IDE (JLG's dev()) and to false when
not in the IDE. In my case non-IDE is always mobile. You can layout the LC
fields in the IDE and then set the rect of the native field to the rect of
the now invisible LC field.

Just a note:

I created a library alias's for all the mobile specific commands I have used
so far. For example if I need a lat/lon location in the IDE or mobile I just
call My alias:

Function SensorReading
Local GPS
if dev() then
      put 53.338960434184 into GPS["latitude"]
      put -43.6840746841539 into GPS["longitude"]
   else
      put mobileSensorReading("location", true) into GPS
end if
return GPS["Latitude"] , GPS["Longitude"]
end SensorReading

This has been mentioned before but I think all mobile specific commands
should act this way in the IDE.

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of J. Landman Gay
Sent: Tuesday, July 05, 2016 7:15 PM
To: How to use LiveCode
Subject: Re: Front and Back Scripts on Mobile

If you assign a name to the native control, mobileControlTarget() returns it
instead of the number. It's a handy way to match up native controls to their
LC counterparts without keeping a reference list.


Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



On July 5, 2016 6:03:49 PM Richard Gaskin <ambassador at fourthworld.com>
wrote:

> Ralph DiMola wrote:
>
>  > This is what works for me....
> ...
>  > on scrollerDidScroll hScrolled, vScrolled
>  >    local ControlID
>  >    --answer "Here!"
>  >    try
>  >       put mobileControlTarget() into ControlID
>  >       set the vscroll of control ControlID of stack "xxx" to vscrolled
>  >       set the hscroll of control ControlID of stack "xxx" to hscrolled
>  >    end try
>  >   pass scrollerDidScroll
>  > end scrollerDidScroll
>
> Now I'm confused.  If mobileControlTarget() returns the ID of the 
> native scroller, how does that affect the scroll of a LiveCode object 
> in the subsequent lines?
>
> Do we have control over mobile control IDs in a way that would allow 
> them to match LC object names or IDs?
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________
>   Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
>
> _______________________________________________
> 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



_______________________________________________
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