Problem with Naming Textbox

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
Knightlite
Posts: 51
Joined: Mon Jan 23, 2012 10:14 pm

Problem with Naming Textbox

Post by Knightlite » Wed Feb 15, 2012 9:05 pm

Hi,

I am evaluating the MobGUI and I am having trouble with the Textbox control.

I start and iPad project and place 1 Textbox on the screen and one button.

I name the text box "txt1"

I place a button on the screen and in the MouseUp event I put the following code:

Code: Select all

put "Hello World" into Field "txt1"
When I try run this I get an error on the line above.

The error reads:

group "Button-1006":execution error at line 28 (Chunk: no such object) near "txt12", char 19

It seems simple enough. Why do I get an error??

If I change the line to:

Code: Select all

put "Hello world" into field "iosUITextField"

It works. How do you change the name of the Text Field of the MobGui control?

Any help would be appreciated.

Thank you,

Jim

Knightlite
Posts: 51
Joined: Mon Jan 23, 2012 10:14 pm

Re: Problem with Naming Textbox

Post by Knightlite » Thu Feb 16, 2012 4:13 pm

I guess the syntax for regular LiveCode Textboxes is different for MobGui Textboxes.

For regular you use:

Code: Select all

put "Hello World" into "txt1"

For MobGui you use this code:

Code: Select all

set the uText of group "txt1" to "Hello World"

When you do that, there are no errors and the control appears to work correctly.

James

Post Reply

Return to “MobGUI”