-
Notifications
You must be signed in to change notification settings - Fork 22
Description
** Existing script **
Hello hello - thanks for reading my post.
delete_cells function does not work for me.
** Description **
I need to delete all cells in a column (named speech) that contain "b" in a specific code (named source).
speech
(source, content)
For instance: (b, hello)
I adjusted my codes according to the post (https://datavyu.org/user-guide/api/reference/1.3.4/deleteCell.html)
Here are my codes:
`require 'Datavyu_API.rb'
trial = get_column("speech") # First get the column from the database
for trial_cell in trial.cells # Now loop through all of the cells in that column, checking if source contains "b"
if trial_cell.source == 'b' # Is source coded as "b" for this cell?
delete_cell(cell)
end
end`
The script keeps on showing the following errors, no matter how I changed the name of codes.
See line 11 of C:\datavyu_files\Delete-CellsTry.rb: delete_cell(cell) See line 8 of C:\datavyu_files\Delete-CellsTry.rb: for trial_cell in trial.cells
Thank you very much for your time to reply!