Front and Back Scripts on Mobile

Sannyasin Brahmanathaswami brahma at
Wed Jul 6 04:13:31 CEST 2016

Thanks for all the input… meanwhile more sleuthing here… has revealed the problem (not the solution, yet…)

Note the architecture… where I think the problem lies

loader.livecode # inserts backscript with the create and delete mobile scroller pName where pName is the object, in this case, a group "portal-links" on card 1 of

Stack A -- home.livecode… # card 1 and the open card handler fires:

createScroller "portal-links"

Stack B - "Surprise-Me"  # card one of this stack uses the same model/objects as card 1 of the home stack: ergo another group "portal-links" but with different links… but group had the same name in Stack A as in Stack B

OK so… when I load the app on the phone… the loader stack opens home.livecode and this runs

command CreateScroller pName -- scrolling regions,groups, fields

if not isMobile() then exit CreateScroller

deleteMobileControl pName -- delete any existing

put (the rect of control pName) into tRect

So far so good. I can scroll the portal links group on Stack A… ha. me thinks all is well… UNTIL I click the button on the portal links that opens the second Stack  B "Surprise-me"  which also issue another command in the card script  (note that I am not closing stack home… perhaps I should)

createScroller "portal-links"

it fails… to scroll… and when I go back to stack A "home" the portal-links group also fails to scroll.


deleteMobileControl pName  has effectively wiped out the scroller "portal-links" in Stack A while at the same time failing to create a new scroller  "portal-links  on card 1 of Stack B

Now neither the portal-links group on Stack A or B will scroll.

So I'm off not to study all the posts you all made… this is interesting and important…because if we intend to use a template model for instantiating common elements across stack… we need some how for the backscript to know what object is *really* the target.  (obviously)



From: use-livecode <use-livecode-bounces at> on behalf of Richard Gaskin <ambassador at>
Reply-To: How LiveCode <use-livecode at>
Date: Tuesday, July 5, 2016 at 1:27 PM
To: How LiveCode <use-livecode at>
Subject: Re: Front and Back Scripts on Mobile

The downside is I have no idea why Bramanathaswami's code isn't working.

More information about the use-livecode mailing list