Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADDLISTITEM and doublebackslash '\\'
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00544910
Message ID:
00545213
Views:
12
My solution is correct and works as advertised.

>Hi!
>
>Thats not correct, because only first backslash will be wanished for disabling status.
>The workarounds here:
>1. Add one backslash - iif(left(m.lcFileName,1)=='\','\'+m.lcFileName,m.lcFileName). Than set enabled property to .F. and back to .T. to re-enable all list items.
>2. Add a space for each list item. This way you get rid problem at all, but beware about trimming (LTrim() or AllTrim()) of that extra leading space.
>
>HTH.
>
>>>Hello all,
>>>
>>>I just ran across something quite strange. I have a table which holds links to files on the network. The table holds the path using UNC path names. i.e. \\server\sharename\filename.txt
>>>
>>>When I attempt to do an ADDLISTITEM(Table.FileName) the list item appears as \server\sharename\filename.txt
>>>
>>>Does anyone have any idea as to why the first backslash would be truncated?
>>
>>You can disable item in the listbox by prefixing it with one backslash "\" .
>>Because of that you have to double all backslahes in the list item
lcFileName = "\\server\sharename\filename.txt"
>>ADDLISTITEM( STRTRAN(lcFileName, "\", "\\") )
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform