Clearing a field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10
- Joined: Wed Apr 18, 2012 9:58 pm
Clearing a field
I have been playing with fields by putting lines of text into a field. Because I am using 'put <variable A> into line 1 of field 3' in one statement and later I use 'put <variable B> into last line of field 3' that subsequent runs of the program don't clear field 3 but just append. Okay an understandable result. I know if I 'put "" into field 3' at the beginning of the program it clears it. While this works i was wondering if I am overlooking a more elegant or appropriate command. The question is what is the best way to empty the contents of a field?
Re: Clearing a field
Thats pretty much it. YOu can put empty into field "fieldname" or set the text of field "fieldname" to empty but it all works out to the same result.
Re: Clearing a field
I'm not sure if I'm fully understanding what you are trying to do, but can't your first put just "put ... into", which will replace anything there? Then your second one can just "put ... after". That way there's no need to clear the field first.
Cheers,
Adrian
Cheers,
Adrian
-
- VIP Livecode Opensource Backer
- Posts: 10
- Joined: Wed Apr 18, 2012 9:58 pm
Re: Clearing a field
Thanks for both responses. Yes Adrian the first one would clear it as you suggest. I can't remember now why I was doing it the way i was doing. Like I said I am just playing so was trying different things. Thanks to you both.. Adrian and Sturgis. I think the empty would be a more elegant and descriptive method.