Standalone riddle
J. Landman Gay
jacque at hyperactivesw.com
Fri Jan 13 16:50:23 EST 2023
I take back the "no inclusions" part, I do include the browser widget on card 2. I see now I
also include the native Android field widget but it isn't placed anywhere and isn't used. The
native field I do use is created with mobileControlCreate.
On 1/13/23 3:42 PM, J. Landman Gay via use-livecode wrote:
> I have a 2-card stack, very simple. The first card has a plain text list field and an editable
> search field. The user types in a string and the resulting match is displayed on card 2 with
> definitions. The stack requires no inclusions and scripts are extremely basic. I use a native
> Android field for the search term, and since mobile controls will be removed when the card
> closes, I place the search term into a hidden LC field for later reference.
>
> I build for Android using LC 10 dp 4, signed for "development only". If I cable the phone to
> the Mac and do a Test build, the apk runs perfectly. If I build an independent standalone and
> install the apk from Google Drive, it runs fine except when putting the search term into the LC
> field, where it claims there is no such object. It is most certainly there on the card.
>
> I can fix this instance by using "field x of me" but then I get the same error in an unrelated
> line in a different handler. If I fix that one, it moves again. The riddle is why does it
> happen in a standalone apk and not in a cabled test run?
>
> The script snippet from cd 1:
>
> on doSearch pText -- pText extracted from native field
> put word 1 to -1 of pText into pText -- strip trailing spaces
> put pText into fld "searchTerm" -- for reference; ERROR: "no such object"
> ... <retrieve definition, populate a browser widget on cd 2>
> go cd 2
>
> BTW, if I leave the test apk on the phone it continues to work correctly after removing the
> cable. The odd behavior happens consistently on a Pixel 7 phone, an old Huawei tablet and a
> newish Samsung tablet.
>
> If I use Nearby Share to move the working apk from a previously cabled build to another device,
> it also works okay. So something is different when building an independent standalone vs.
> building a test app.
>
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list