Setting mobGUI 1.24 fields for desktop use
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
Setting mobGUI 1.24 fields for desktop use
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Setting mobGUI 1.24 fields for desktop use
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 )
HTH
Code: Select all
set the mgText of group "MyField" to "Continue"
LiveCode Development & Training : http://splash21.com
Re: Setting mobGUI 1.24 fields for desktop use
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.
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.
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Setting mobGUI 1.24 fields for desktop use
shouldn't it be...on mouseUp
set the mgText of group "MyField" to "Continue"
end mouseUp
set the mgText of field "myField" to "Continue" ?.... Where does the group come from ?
Re: Setting mobGUI 1.24 fields for desktop use
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.
set the mgText of group "MyField" to "Continue"
This doesn't work either.
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Setting mobGUI 1.24 fields for desktop use
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.
LiveCode Development & Training : http://splash21.com
Re: Setting mobGUI 1.24 fields for desktop use
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
if the environment<>"mobile" then
set the uText of group "accountfield" to tReturnedAccountNumber
end if
Re: Setting mobGUI 1.24 fields for desktop use
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
Thanks,
Tim G