Setting mobGUI 1.24 fields for desktop use

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
wizard
Posts: 21
Joined: Fri Jan 03, 2014 1:00 pm

Setting mobGUI 1.24 fields for desktop use

Post by wizard » Fri Mar 21, 2014 8:23 pm

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.

splash21
VIP Livecode Opensource Backer
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

Post by splash21 » Sat Mar 22, 2014 1:02 pm

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
LiveCode Development & Training : http://splash21.com

wizard
Posts: 21
Joined: Fri Jan 03, 2014 1:00 pm

Re: Setting mobGUI 1.24 fields for desktop use

Post by wizard » Mon Mar 24, 2014 12:35 pm

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.

Dixie
Livecode Opensource Backer
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

Post by Dixie » Mon Mar 24, 2014 1:08 pm

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 ?

wizard
Posts: 21
Joined: Fri Jan 03, 2014 1:00 pm

Re: Setting mobGUI 1.24 fields for desktop use

Post by wizard » Mon Mar 24, 2014 4:26 pm

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.

splash21
VIP Livecode Opensource Backer
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

Post by splash21 » Tue Mar 25, 2014 12:30 am

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

wizard
Posts: 21
Joined: Fri Jan 03, 2014 1:00 pm

Re: Setting mobGUI 1.24 fields for desktop use

Post by wizard » Tue Mar 25, 2014 12:14 pm

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

DataDude
Posts: 7
Joined: Tue Mar 11, 2014 6:06 pm

Re: Setting mobGUI 1.24 fields for desktop use

Post by DataDude » Fri Apr 11, 2014 1:35 am

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

Post Reply

Return to “MobGUI”