<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>None of the [list] objects will work either, for the reasons I wrote below.&nbsp; For an example of what I'm </DIV>
<DIV>saying, open text-float.txt, add the word "list" at the beginning and save it.&nbsp; Then you will see that your </DIV>
<DIV>patch works.</DIV>
<DIV>&nbsp;</DIV>
<DIV>If anyone knows of an external that works like [textfile] but outputs each line as a list, that would solve your problem.</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Jonathan</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> matohawk &lt;matohawk@gmail.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> pd-list &lt;Pd-list@iem.at&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wed, June 30, 2010 3:58:56 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [PD] Problem with Textfile and line with float<BR></FONT><BR>Hi Jonathan,<BR><BR>Yes I know textfile "works" but I can't put any kind of object behind this Texfile.<BR><BR>I'll try all list object and this the same problem.<BR>Look this :<BR>http://www.th-th.fr/DOCS/Patch/bug-texfile.pd<BR><BR><BR>I need to read this line with float at the begining but I can't.<BR>So I think we will take a script to do this because textfile can't do this.<BR><BR>Thanks for your help<BR>Thomas<BR><BR><BR>Jonathan Wilkes a écrit :<BR>&gt; The problem occurs because Pd has several built-in message types, and the float message is one of them. Pd expects any
 message that has the "float" selector to have one argument, and that argument should be a<BR>&gt; float-atom (e.g., "float 1").&nbsp; So if you type "float foo" in a message box and click it, Pd complains about<BR>&gt; "bad arguments" because (I think) when the message box tries to parse the message, it sees the "float"<BR>&gt; selector and thus expects a number for the argument, but instead it gets the symbolic-atom "foo."<BR>&gt;&nbsp; In your example patch, if you disconnect all the objects from the outlet of [textfile] and click<BR>&gt; the [bng], you'll notice that you don't get an error.&nbsp; I would take this to mean that [textfile] does its<BR>&gt; job-- its just that once you try to do anything with the message "float toto 0 1 2" by connecting<BR>&gt; [textfile]'s outlet to another object, Pd will catch the badly formed message and report an error.<BR>&gt;&nbsp; (On the other hand, if your example text file had the line "float 3 0 1 2," the
 first argument ("3") would be<BR>&gt; the right type of atom, so Pd would just silently truncate<BR>&gt; everything after the first argument.&nbsp; But you'd still get an error from the<BR>&gt; right inlet of [select float] because, ironically, by making the first argument of [select] the word<BR>&gt; "float" instead of a float-atom like "3," you are instantiating a [select] object that expects symbol<BR>&gt; messages and not floats.)<BR>&gt;&nbsp; As far as a solution, you could begin each line of your text file with the selector "list", or a word that<BR>&gt; is not the selector of Pd's builtin messages.&nbsp; If you're reading in arbitrary data and you can't control<BR>&gt; whether each line starts with something that could be confused for a built-in Pd message type, I'm not sure<BR>&gt; what the best solution is.<BR>&gt;&nbsp; -Jonathan<BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; *From:* Pedro
 Lopes &lt;<A href="mailto:pedro.lopes@ist.utl.pt" ymailto="mailto:pedro.lopes@ist.utl.pt">pedro.lopes@ist.utl.pt</A>&gt;<BR>&gt; *To:* matohawk &lt;<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A>&gt;<BR>&gt; *Cc:* pd-list &lt;<A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A>&gt;<BR>&gt; *Sent:* Tue, June 29, 2010 6:49:44 PM<BR>&gt; *Subject:* Re: [PD] Problem with Textfile and line with float<BR>&gt; <BR>&gt; humm.. I see what you mean now. It gives a error with the float argument when it arrives at the objects after the textfile. I'm trying to figure out the reason for that.<BR>&gt; <BR>&gt; On Tue, Jun 29, 2010 at 11:42 PM, Pedro Lopes &lt;<A href="mailto:pedro.lopes@ist.utl.pt" ymailto="mailto:pedro.lopes@ist.utl.pt">pedro.lopes@ist.utl.pt</A> &lt;mailto:<A href="mailto:pedro.lopes@ist.utl.pt" ymailto="mailto:pedro.lopes@ist.utl.pt">pedro.lopes@ist.utl.pt</A>&gt;&gt;
 wrote:<BR>&gt; <BR>&gt;&nbsp; &nbsp; I did that, but what are you expecting your patch to do?<BR>&gt;&nbsp; &nbsp; Should it send each object read from text file separately?<BR>&gt; <BR>&gt;&nbsp; &nbsp; 'Cause here (with the patch I explain in my previous reply) the<BR>&gt;&nbsp; &nbsp; textfile reads your file and outputs all the values to a [print<BR>&gt;&nbsp; &nbsp; list] so then its just a matter of manipulating that into what you want.<BR>&gt; <BR>&gt;&nbsp; &nbsp; I used your file for the tests. I can try to look and guess what do<BR>&gt;&nbsp; &nbsp; you intend, but its probably less ambiguous if you explain the<BR>&gt;&nbsp; &nbsp; purpose. :)<BR>&gt; <BR>&gt;&nbsp; &nbsp; Best of luck,<BR>&gt;&nbsp; &nbsp; Pedro<BR>&gt; <BR>&gt; <BR>&gt;&nbsp; &nbsp; On Tue, Jun 29, 2010 at 11:36 PM, matohawk &lt;<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A><BR>&gt;&nbsp; &nbsp; &lt;mailto:<A
 href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A>&gt;&gt; wrote:<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Hi Pedro,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Sorry I think I'm not very with explanation.<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; I know how textfile works it's not my problem<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Have a look of this patch and textfile, it's better to<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; understand the problem:<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; <A href="http://www.th-th.fr/DOCS/Patch/bug-texfile.pd" target=_blank>http://www.th-th.fr/DOCS/Patch/bug-texfile.pd</A><BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; http://www.th-th.fr/DOCS/Patch/text-float.txt<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Download the twho files, open the patch and click on bang<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Cheers,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Thomas<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; Pedro Lopes a écrit
 :<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I'm not following the "concept" behind your code.<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Notice that you can connect a message box "print" and send<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; that command to textfile. And it reads your file to the pd<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shell correctly.<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [read your-file.txt]<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; [print(&nbsp; &lt;-- this is a message<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | /<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |/<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; [bang] &lt;-- hit this to read,.<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | /<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |/<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [textfile]<BR>&gt;&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; |<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [print list]<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; And it works. Take a look at the help file, it shows hot to<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use it. I hope I'm understanding your issue, if not,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hopefully someone does :)<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Best of luck,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pedro<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p.s: remember to use the "rewind" message to textfile,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; because otherwise it doesn't read the line again! Because it<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; moves forward with the seek file pointer.<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; On Tue, Jun 29, 2010 at 10:37 PM, thomas
 thiery<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A> &lt;mailto:<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A>&gt;<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mailto:<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A> &lt;mailto:<A href="mailto:matohawk@gmail.com" ymailto="mailto:matohawk@gmail.com">matohawk@gmail.com</A>&gt;&gt;&gt; wrote:<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hi pd-list,<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; test this patch, I saw a curious problem. I need to read<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line with<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "float" at the begining of a line and textfile can't do this.<BR>&gt;&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; It's a pity<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --&nbsp; &nbsp; Matohawk alias Th-Th<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <A href="http://www.th-th.fr/" target=_blank>www.th-th.fr</A> &lt;http://www.th-th.fr/&gt; &lt;http://www.th-th.fr&gt;<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A> &lt;mailto:<A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A>&gt;<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mailto:<A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A> &lt;mailto:<A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A>&gt;&gt; mailing
 list<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNSUBSCRIBE and account-management -&gt;<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://lists.puredata.info/listinfo/pd-list<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pedro Lopes<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; contacto: <A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A> &lt;mailto:<A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A>&gt;<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mailto:<A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A> &lt;mailto:<A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A>&gt;&gt;<BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; website:
 http://web.ist.utl.pt/Pedro.Lopes<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A> &lt;mailto:<A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A>&gt; mailing list<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; UNSUBSCRIBE and account-management -&gt;<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; <A href="http://lists.puredata.info/listinfo/pd-list" target=_blank>http://lists.puredata.info/listinfo/pd-list</A><BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;&nbsp; &nbsp; --&nbsp; &nbsp; Pedro Lopes<BR>&gt;&nbsp; &nbsp; contacto: <A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A> &lt;mailto:<A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A>&gt;<BR>&gt;&nbsp; &nbsp; website: <A
 href="http://web.ist.utl.pt/Pedro.Lopes" target=_blank>http://web.ist.utl.pt/Pedro.Lopes</A><BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; -- Pedro Lopes<BR>&gt; contacto: <A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A> &lt;mailto:<A href="mailto:jazz@radiozero.pt" ymailto="mailto:jazz@radiozero.pt">jazz@radiozero.pt</A>&gt;<BR>&gt; website: <A href="http://web.ist.utl.pt/Pedro.Lopes" target=_blank>http://web.ist.utl.pt/Pedro.Lopes</A><BR>&gt; <BR><BR><BR>_______________________________________________<BR><A href="mailto:Pd-list@iem.at" ymailto="mailto:Pd-list@iem.at">Pd-list@iem.at</A> mailing list<BR>UNSUBSCRIBE and account-management -&gt; <A href="http://lists.puredata.info/listinfo/pd-list" target=_blank>http://lists.puredata.info/listinfo/pd-list</A><BR></DIV></DIV></div><br>

      </body></html>