deleting lines from a text file

rand valentine jrvalent at wisc.edu
Fri May 21 11:20:52 EDT 2004


  I've experimented a bit with attempting to delete lines from a text file.
The following simple script should readily allow the deletion of a line,
no?? --

on mouseUp
  answer file "what file?"
  put "file:" & it into theFile
  delete line 2 of url theFile
end mouseUp

 This produces an error of type "chunk," with the specific message: "can't
find object."

 Things work fine if you change "delete" to "put empty into", but that
creates the problem that some of you have pointed out, ie, that the
delimiter is not deleted.

 Could someone else verify this, so that I know it's a bug and not bad karma
:-)? Thanks.

rand valentine





More information about the use-livecode mailing list