2

I need to delete last character in a string Livecode.

I have wrote this below in English.

on mouseUp    

   replace last character with Backspace in field"dialed"

end mouseUp

I am a newbie, so please use simple answers :) Thank you.

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Jason
  • 57
  • 8
  • Hi Tim and thank you I have tried the above code: I have looked in dictionary in livecode, but it is no help, I also googled, cant find code for a simple delete char button. sigh. I am super new – Jason Nov 19 '15 at 23:17

2 Answers2

1

Deleting the last character of a field is very simple:

on mouseUp
  delete the last char of fld "Dialed"
end mouseUp
Mark
  • 2,380
  • 11
  • 29
  • 49
  • Thank you so very much, and doesn't even need code to handle if the string is empty!! Wow thank you! – Jason Nov 20 '15 at 00:16
  • If the answer is useful, please click on the Accept icon on the left. That keeps people answering your questions. – Mark Nov 20 '15 at 00:51
  • Ok I might be dense, but there isn't a "Accept" button for me to click. I do appreciate the answer it works flawlessly. – Jason Nov 22 '15 at 04:57
  • Okay, that's weird but if there isn't one so be it. – Mark Nov 22 '15 at 09:56
1

If you think that is nice, what about:

delete character 2 of word 3 of line 4 of fld "dialed"
Mark
  • 2,380
  • 11
  • 29
  • 49
dunbarx
  • 756
  • 5
  • 4