Bug with quote and put URL

Jan Schenkel janschenkel at yahoo.com
Mon Jul 28 10:58:00 EDT 2003


--- François Cuneo <francois.cuneo at cuk.ch> wrote:
> Hello everybody!
> I have a not very funny bug to present:-)
> Here is the code and it works perfectly:
> 
> *****
> set the itemdelimiter to tab
> put item 1 to -2 of chemin into chemin
> put chemin &"/Data/French.rev" into cheminloc1
> 
> 
> --  IMPORTATION Des FICHIER FRANCAIS (FRENCHOBJ.TXT
> et FrenchMsg.txt) VERS
> --  LES CHAMPS DE LA CARTE 2
>    
>      
> put "put URL"&& QUOTE&"file:" &cheminloc1 &QUOTE
> &&"into field" && QUOTE
> &"messages"&QUOTE&&"of card id 1032 of me"  into
> fich_a_importer
>      
> do fich_a_importer
> 
> delete line 1 of fld "Objets" of card id 1032 of me
> --j'efface le titre de
> la liste
> *****
>      
> OK, all the file is correctly in the field Messages,
> fine.
> 
> The imported text is a tabuled text.
> 
> If I have in the text ((tab) it's when I use the
> tabkey):
> 
> coucou (tab) gag (tab) haha
> 
> all is good BUT if the text is with a quote:
> 
> "coucou" (tab) gag (tab) "haha"
> 
> I obtain double quote!!
> 
> ""coucou"" (tab) "gag" (tab) ""ahaha""
> 
> grrrrr.....
> 
> Shure it a bug!
> 
> No?? It's me???
> 
> 
> Thank you to say why!!!
> Friendly
> 
> François
> 

Bonjour François,

I'm not entirely sure what is wrong, but you can make
the code easier to follow by making the following
change :

> put "put URL"&& QUOTE&"file:" &cheminloc1 &QUOTE
> &&"into field" && QUOTE
> &"messages"&QUOTE&&"of card id 1032 of me"  into
> fich_a_importer
> do fich_a_importer

  put URL ("file:" & cheminLoc1) into field \
      "messages" of card id 1032 of me 

Both the 'do' command and the 'value' function are
quite sensitive to quotes.

If you still have the problem after making the change
above, check the input file with a simple text editor
; for example, I've seen it happen upon reading data
coming from FileMaker, that the export program had
been overzealous.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the use-livecode mailing list