parsed pathname - answer found

Ian Wood ian at azurevision.co.uk
Tue Jan 27 18:17:00 EST 2004


<snip>

>> on mouseUp
>>  put field "folderList" into vMyPath -- (the path was stored in that
>> field)
>>  repeat with i = the number of chars in vMyPath down to 1
>>    if char i of vMyPath = "/" then exit repeat
>>    put char i of vMyPath before vParsedPath
>>  end repeat
>>  answer vParsedPath -- (or do anything else now that we have it)
>> end mouseUp
>>
>> Seems to work pretty well though I'm sure there's a more elegant 
>> method.
>
> You could try this:
>
>  on mouseUp
>    set itemDel to "/"
>    answer last item of fld "folderList"
>  end mouseUp
>
> Regards,
>
> Scott Rossi
>

Don't forget to reset the item delimiter:

on mouseUp
	put itemDel into defaultDel
	set itemDel to "/"
	answer last item of fld "folderList"
	put defaultDel into itemDel
end mouseUp

Ian Wood
Panoramic photography, from web to billboard, sunrise to moonrise
http://www.azurevision.co.uk



More information about the use-livecode mailing list