Saving changes in a table

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
david_ff
Posts: 12
Joined: Mon Jan 29, 2007 1:15 am

Saving changes in a table

Post by david_ff » Wed Dec 21, 2011 5:34 pm

Novice time: I am running Revolution 2.1.2 and just discovered the ability to convert a field into a table, and it was very easy to copy data from Excel and paste it into the table. The trouble comes when I try to change the data in a table: I cannot get the changes to stick. If I delete a row, it momentarily vanishes, then if I click outside the table it reappears. Same if I change the color of a row. This happens whether I effect these changes in the message board (i.e., delete row 4 of fld "aaa") or in a script:
on mouseup
put the clickline into jj
put word 2 of jj into jj
if the optionkey is down AND THE SHIFTKEY IS DOWN then
set the textcolor of LINE JJ OF FLD "AAA" to red
end if
end mouseup
Are there any incantations or magic words (i.e., code) that can get this table to behave itself?
____________________________
(2 days later) I just found a simple work-around to this problem:
Since changes in the actual text in each cell are saved, as opposed to 'delete...' :
on mouseup
put the clickline into jj
put word 2 of jj into jj
if the optionkey is down AND THE SHIFTKEY IS DOWN then
repeat with x = number of words of line jj of fld "aaa" down to 1
put " " into word x of line jj of fld "aaa"
end repeat
end if
end mouseup
Crude perhaps, but it serves my purposes.
Last edited by david_ff on Thu Dec 22, 2011 7:43 pm, edited 1 time in total.

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

Re: Saving changes in a table

Post by Klaus » Wed Dec 21, 2011 5:58 pm

Hi David,

this is everything but OFF-TOPIC, so I will move this thread to the correct forum! 8)


Best

Klaus

Post Reply