Confirm Long File Name Bug in Player Object

Brian Yennie briany at qldlearning.com
Fri Jun 24 22:26:27 EDT 2005


Sivakatirswami,

See "create alias" - pretty easy to use.

I can't promise that Rev won't resolve the alias and still have long 
file name problems, but it may be worth a shot. You could probably 
write a handler, if this works, that loops through all of your player 
objects and does something like:

repeat with i=1 to number of players
    put the fileName of player i into playerPath
    set the itemDelimiter to "/"
    put specialFolderPath("temporary")&"/"&(item -1 of playerPath) into 
aliasPath
    create alias aliasPath to file playerPath
    if (the result is empty) then
       set the fileName of player i to aliasPath
    else
       answer error "Error Creating Alias to Media"
    end if
end repeat

Untested, but hopefully helpful. I've tested that setting the fileName 
to an alias DOES work, I just haven't experienced the long file path 
bug myself, so can't say whether it cures that!

HTH -

Brian

> I'm all ears... in this app, the sound file is downloaded over the 
> net... and later thrown away... the source file is on our server and 
> will continue to carry the long file name... so, temporarily changing 
> the name of the file is not "dangerous" in this context and since we 
> "own" the files, it's not like I'm messing with my clients file 
> archive... but still I like the alias possibility.
>
> I would need that to work on both Mac and Windows... do you have a 
> cross platform script to code an alias?
>
> thanks
> Sivakatirswami
>
> On Jun 24, 2005, at 2:58 PM, Brian Yennie wrote:
>
>> I know this is a pretty dirty sounding workaround, but what happens 
>> if you place an alias to the file in the user's temporary files 
>> (instead of copying it there)? More work but less disk space if it 
>> works...
>>
>>
>>>> If you want to deliver a media player now, the only way around this 
>>>> is to
>>>> have your app duplicate the user's media somewhere on their drive, 
>>>> rename
>>>> it, and then make sure to delete the duplicate when you're done.  
>>>> For a few
>>>> files, one by one, this might be OK, but I question whether this is 
>>>> a valid
>>>> workaround for potentially dozens of multi-megabyte files.
>>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list