Removing text from a string
Jeanne A. E. DeVoto
revolution at jaedworks.com
Sun Oct 9 22:03:13 EDT 2005
At 2:23 AM +0100 10/10/2005, Ian Leigh wrote:
>I have a list of filenames which are displayed in a list field. When
>clicked on the name of the selected file appears in a label but I
>don't want the extension displayed. I have looked at the docs but
>can't see a simple way of doing it!
This will do it:
set the itemDelimiter to "."
put item 1 to -2 of the selectedText into field "Label"
(If you're certain the filename itself doesn't contain any periods,
you can substitute
put item 1 of the selectedText into field "Label"
for the second line. If you're working exclusively for Windows, you
can make this simplifying assumption, but not for Mac OS, OS X, or
Unix.)
--
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com
More information about the use-livecode
mailing list