Basic table field

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hsh_636
Posts: 31
Joined: Sun Mar 02, 2014 5:15 pm

Basic table field

Post by hsh_636 » Tue Jun 03, 2014 3:45 pm

Hello, I dont know much about basic table fields or how basic they are, Im already using it to store data from mysql database and its working fine, but I dont know how to get the contents of the cells or a specific cell in the table and I searched for some kind of documentation about this type of field but the information I found wasnt useful.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Basic table field

Post by Klaus » Tue Jun 03, 2014 4:34 pm

Hi hsh_636,

well, a TABLE field is "just" a field with TABs in it! :D
...
## To get "cell" B2
set itemdel to TAB
put item 2 of line 2 of fld "your table field here" into tCellB2
...


Best

Klaus

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: Basic table field

Post by sritcp » Thu Jun 19, 2014 1:44 pm

So, what message does the field object receive when you click on item 2 of line 2 (that is, the cell[2,2] is highlighted, with the insertion point appearing at the beginning) ?

The code

Code: Select all

on mouseUp
   put the selectedText of me into msg
end mouseUp
returns empty.

Thanks,
Sri.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Basic table field

Post by bn » Thu Jun 19, 2014 2:31 pm

Hi Sri,

the table field is very basic and on top the working is hidden from the user in a frontscript.

for a discussion see:
http://runtime-revolution.278305.n4.nab ... 76192.html

there is also a script how to get at the cell that received a click.

Kind regards
Bernd

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: Basic table field

Post by sritcp » Fri Jun 20, 2014 9:18 pm

Thanks for the link, Bernd!

Regards,
Sri.

Post Reply