Delete a Line of a URL

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
maxvit99
Posts: 5
Joined: Fri Dec 02, 2011 10:08 pm

Delete a Line of a URL

Post by maxvit99 » Thu Dec 22, 2011 8:41 pm

Hi, I have problems when I want to delete a line in a url

Code: Select all

delete line gline of URL ("file:" & $USERPROFILE & "\Documents\AllDescriptions.txt")
It gives me an error like this:
button "Delete": execution error at line 6 (Chunk: can't find object), char 4
Is there a way to do that :?:

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Delete a Line of a URL

Post by mwieder » Thu Dec 22, 2011 9:24 pm

Not in that compact a form, no.

Code: Select all

    put URL ("file:" & $USERPROFILE & "/Documents/AllDescriptions.txt") into tFile
    delete line gline of tFile
    put tFile into URL ("file:" & $USERPROFILE & "/Documents/AllDescriptions.txt")

maxvit99
Posts: 5
Joined: Fri Dec 02, 2011 10:08 pm

Re: Delete a Line of a URL

Post by maxvit99 » Thu Dec 22, 2011 10:14 pm

Thank you so much,

Max :D

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Delete a Line of a URL

Post by mwieder » Thu Dec 22, 2011 10:38 pm

NP. I think three lines isn't bad, considering all the work that's going on behind the scenes.

Post Reply