delete and put empty in url "file:" structures

Raymond Griffith rgriffit at ctc.net
Thu May 20 10:51:40 CDT 2004


On Thursday, May 20, 2004, at 10:21  AM, rand valentine wrote:

>  Hi, all. I am wondering if I have found a bug in runrev version 2.2 
> running
> under mac os x.3.3. here is the problem:
>
> if i have a script line that goes
>
>    delete line x of url "file:someFile.txt"
>
> the script crashes saying that "the object cannot be found"
>
> but if i change the script to:
>
>    put empty into line x of url "file:someFile.txt"
>
>  then the script works. Even the transcript docs say that "delete" and 
> "put
> empty..." are equivalents.

They aren't really equivalent. Suppose you start with somevar equal to

1
2
3

and you say "delete line 2 of somevar". You then get

1
3

but if you say "put empty into line 2 of somevar" you would get

1

3

So they aren't really the same.


> Why would the script crash with "delete" then but
> not with "put empty"?

Check out the whole thing. Perhaps you don't actually have that line! 
Putting empty into a line you don't have creates the line, by the way.


>  know there are no other errors with this script (ie,
> the problem isn't about finding files or anything like that, it's 
> _strictly_
> about deleting a line), though I'm not sure if the error occurs with 
> every
> call to delete a line in every url "file" structure. this drove me 
> batty
> this morning, till i figured out what the problem was.
>
>  thanks.
>
> rand valentine
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list