Live code text feild and datagrid problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Live code text feild and datagrid problem
Basically I want the user to type a name of item in text field box. when they click the confirm button it should show up in the data grid. Now the problem i'm having is how to get the text to move to line 2 when the user enters another name and click the confirm once and not overwriting the previous on the same line?
Re: Live code text feild and datagrid problem
Hi.
Try this experiment. Make a button and two fields on a card. In the button script:
Now if you type into fld 1, and then click the button, the text just typed will appear in fld 2. The selection will move to the next line in fld 1, ready for new data.
This is a cute little lesson in using LC to fool around with text. But it seems to me to be fragile, in that the user can upset the formatting of fld 1 by hand. So first off, does this actually do what you asked? If so, is it robust enough? Do you think you want a bit more control over what the user does, so that he cannot, say, delete data or modify the format in fld 1? All these are possible. It also may be useful to re-think your input method. Write back with thoughts and complaints.
Craig Newman
Try this experiment. Make a button and two fields on a card. In the button script:
Code: Select all
on mouseUp
put the last line of fld 1 into fld 2
put return after fld 1
select after fld 1
end mouseUp
This is a cute little lesson in using LC to fool around with text. But it seems to me to be fragile, in that the user can upset the formatting of fld 1 by hand. So first off, does this actually do what you asked? If so, is it robust enough? Do you think you want a bit more control over what the user does, so that he cannot, say, delete data or modify the format in fld 1? All these are possible. It also may be useful to re-think your input method. Write back with thoughts and complaints.
Craig Newman
Re: Live code text feild and datagrid problem
Hi daybreak,
1. hello and welcome to the forum!
2. What Craig said!
Best
Klaus
1. hello and welcome to the forum!

2. What Craig said!
Best
Klaus
Re: Live code text feild and datagrid problem
Try to read also this: http://livecode.wikia.com/wiki/Datagrid_API
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Live code text feild and datagrid problem
Hi guy and thank you all for the reply. Just got home I will test and see what works 
