setting the default folder to the folder where the stack is..
Scott Rossi
scott at tactilemedia.com
Fri Dec 14 16:50:00 EST 2001
Recently, Sjoerd Op 't Land wrote:
> So, optimized we'd get:
>
> function getFolderFromFilename tFilename
> set itemDel to "/"
> return item 1 to -2 of tFilename & "/"
> end function getFolderFromFilename
>
> Note: I wrote "set the itemDelimiter" as "set itemDel", because they're
> equivalent, and it takes MC some piece of time for each char it has process.
>
> So: "the shorter written, the faster compiled"
>
> (I note for myself, that having used the starter kit for a long time, is a
> good training for short-writing.)
The above could be even shorter:
function getFolderFromFilename tFilename
set itemDel to "/";return item 1 to -2 of tFilename & "/"
end getFolderFromFilename
Also note that the last line should not include the word "function"
Regards,
Scott
_____________________________________________________________________
Scott Rossi Tactile Media - Multimedia & Design
Creative Director Email: scott at tactilemedia.com
Web: http://www.tactilemedia.com
More information about the use-livecode
mailing list