Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wierd behavior with addlistitem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00392691
Message ID:
00393120
Vues:
20
>>>mytable.fcDatabase in this case has a path like:
>>>"\\computer\sharename\datapath"
>>>
>>>Problem is, the addlistitem() is stripping off the first "\". What ends up
>>>being stored is "\computer\sharename\datapath"
>>>
>>>I tried assigning field value to a variable first, and then addlistitem
>>>(variable, count), but that did the same thing. Is this something wierd with
>>>addlistitem, or am I just smokin?
>>
>>Something weird. :-) Backslash in a list means the item is disabled, so
>>that's why you're losing it here. Try trimming the '\\' off when you add it,
>>and then when you select it, put it back on.
>
>Hmmm. Actually what I ended up as a workaround was to check for the '\\' first
>>and then stuck an extra '\' at the beginning and that works as well. I'm not
>>sure I follow your meaning when you say the backslash makes the
>>item "disabled". I don't see any different behavior in the display of an item
>>with a single '\' in the list. Can you elaborate?

Ok, I gave the right information -- but it wasn't the answer to your question. :-) Fox is treating the first backslash as an escape so that the second backslash is interpreted as a backslash. Similarly, you can type \t in the Find dialog to match a tab.

Sorry if this is slightly incoherent -- I shouldn't try to answer questions after midnight. :-)
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform