Page 1 of 1

Setting mobGUI 1.24 fields for desktop use

Posted: Fri Mar 21, 2014 8:23 pm
by wizard
In the pre 1.0 version, for desktop, we could use "set the utext ..."

example:

set the uText of group "accountfield" to tReturnedAccountNumber

How is this supposed to be done for the 1.24 version ... it does not appear it is supported any longer. Thank you.

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Sat Mar 22, 2014 1:02 pm
by splash21
Hi, wizard. From the docs : http://mobgui.com/doc.php?docId=18 ( or page 35 of the V1.24 PDF : http://mobgui.com/MobGUI.pdf )

Code: Select all

set the mgText of group "MyField" to "Continue"
HTH :D

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Mon Mar 24, 2014 12:35 pm
by wizard
Still no go - here is what I did to test with MobGui 1.24 using LC 6.6.0 Build 4003. Using MobGui, Android, dropped an input field (named it "MyField"), then dropped a button. Within the button, entered following script code:

on mouseUp
set the mgText of group "MyField" to "Continue"
end mouseUp


I then used the Browse tool, touched the button, nothing happened - was expecting "Continue" to appear in the field box.

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Mon Mar 24, 2014 1:08 pm
by Dixie
on mouseUp
set the mgText of group "MyField" to "Continue"
end mouseUp
shouldn't it be...
set the mgText of field "myField" to "Continue" ?.... Where does the group come from ?

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Mon Mar 24, 2014 4:26 pm
by wizard
Dixie - that doesn't work - get an error "Chunk: no such object" Below copied directly from mobgui documentation:

set the mgText of group "MyField" to "Continue"

This doesn't work either.

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Tue Mar 25, 2014 12:30 am
by splash21
The native iOS / android fields are just that - native for mobile. If you look in the behavior script (you can right click => Edit Behavior on the control), you'll see that the get and set handlers for mgText use the mobile commands. You could add a normal LC text field to the control and show that when the app is not running on a mobile platform. I'll add that to the todo list - it is quite convenient to be able to use one control on both mobile and desktop.

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Tue Mar 25, 2014 12:14 pm
by wizard
Thank you. That would be very useful. In the MobGui version 0.28 this behavior did work ok - for instance:

if the environment<>"mobile" then
set the uText of group "accountfield" to tReturnedAccountNumber
end if

Re: Setting mobGUI 1.24 fields for desktop use

Posted: Fri Apr 11, 2014 1:35 am
by DataDude
Yes, please do consider adding in support to allow using the same name for both the mobile and desktop versions of a control. It would be a big plus to me.

Thanks,
Tim G