Not trying to hijack this thread into a different subject, I was messing with the external in order to understand how it works. I got my mods on, compiled it, all ok.<br><br>But how can I load it? pdextended always load a default &quot;filetext&quot;, I even started with the -nostdpath but no luck. It doesn&#39;t load mine. I&#39;m launching pd from the same dir as the filetext.pd_linux... What&#39;s the correct way to test externals in these conditions..?<br>


<br>Some help?<br><br>Best regards to all,<br>Pedro<br>p.s. also tryed &gt;pdextended -path textfile.pd_linux (nothin&#39;..)<br><br><div class="gmail_quote">On Wed, Jun 30, 2010 at 12:24 AM, Jonathan Wilkes <span dir="ltr">&lt;<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>

The problem occurs because Pd has several built-in message types, and the float message is one of them.  </div>

<div>Pd expects any message that has the &quot;float&quot; selector to have one argument, and that argument should be a </div>
<div>float-atom (e.g., &quot;float 1&quot;).  So if you type &quot;float foo&quot; in a message box and click it, Pd complains about </div>
<div>&quot;bad arguments&quot; because (I think) when the message box tries to parse the message, it sees the &quot;float&quot; </div>
<div>selector and thus expects a number for the argument, but instead it gets the symbolic-atom &quot;foo.&quot;</div>
<div> </div>
<div>In your example patch, if you disconnect all the objects from the outlet of [textfile] and click </div>
<div>the [bng], you&#39;ll notice that you don&#39;t get an error.  I would take this to mean that [textfile] does its </div>
<div>job-- its just that once you try to do anything with the message &quot;float toto 0 1 2&quot; by connecting </div>
<div>[textfile]&#39;s outlet to another object, Pd will catch the badly formed message and report an error.</div>
<div> </div>
<div>(On the other hand, if your example text file had the line &quot;float 3 0 1 2,&quot; the first argument (&quot;3&quot;) would be </div>
<div>the right type of atom, so Pd would just silently truncate </div>
<div>everything after the first argument.  But you&#39;d still get an error from the </div>
<div>right inlet of [select float] because, ironically, by making the first argument of [select] the word</div>
<div>&quot;float&quot; instead of a float-atom like &quot;3,&quot; you are instantiating a [select] object that expects symbol </div>
<div>messages and not floats.)</div>
<div> </div>
<div>As far as a solution, you could begin each line of your text file with the selector &quot;list&quot;, or a word that </div>
<div>is not the selector of Pd&#39;s builtin messages.  If you&#39;re reading in arbitrary data and you can&#39;t control </div>
<div>whether each line starts with something that could be confused for a built-in Pd message type, I&#39;m not sure </div>
<div>what the best solution is.</div>
<div> </div>
<div>-Jonathan</div>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Pedro Lopes &lt;<a href="mailto:pedro.lopes@ist.utl.pt" target="_blank">pedro.lopes@ist.utl.pt</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> matohawk &lt;<a href="mailto:matohawk@gmail.com" target="_blank">matohawk@gmail.com</a>&gt;<br>


<b><span style="font-weight: bold;">Cc:</span></b> pd-list &lt;<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, June 29, 2010 6:49:44 PM<br>


<b><span style="font-weight: bold;">Subject:</span></b> Re: [PD] Problem with Textfile and line with float<br></font><div><div></div><div><br>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&#39;m trying to figure out the reason for that. <br>


<br>
<div class="gmail_quote">On Tue, Jun 29, 2010 at 11:42 PM, Pedro Lopes <span dir="ltr">&lt;<a href="mailto:pedro.lopes@ist.utl.pt" rel="nofollow" target="_blank">pedro.lopes@ist.utl.pt</a>&gt;</span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">I did that, but what are you expecting your patch to do? <br>Should it send each object read from text file separately? <br>


<br>&#39;Cause here (with the patch I explain in my previous reply) the textfile reads your file and outputs all the values to a [print list] so then its just a matter of manipulating that into what you want.<br><br>I used your file for the tests. I can try to look and guess what do you intend, but its probably less ambiguous if you explain the purpose. :)<br>


<br>Best of luck,<br><font color="#888888">Pedro</font> 
<div>
<div></div>
<div><br><br>
<div class="gmail_quote">On Tue, Jun 29, 2010 at 11:36 PM, matohawk <span dir="ltr">&lt;<a href="mailto:matohawk@gmail.com" rel="nofollow" target="_blank">matohawk@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Hi Pedro,<br>Sorry I think I&#39;m not very with explanation.<br>I know how textfile works it&#39;s not my problem<br>


Have a look of this patch and textfile, it&#39;s better to understand the problem:<br><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><a href="http://www.th-th.fr/DOCS/Patch/text-float.txt" target="_blank">http://www.th-th.fr/DOCS/Patch/text-float.txt</a><br>


<br>Download the twho files, open the patch and click on bang<br><br>Cheers,<br>Thomas<br><br>Pedro Lopes a écrit :<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div>I&#39;m not following the &quot;concept&quot; behind your code.<br><br>Notice that you can connect a message box &quot;print&quot; and send that command to textfile. And it reads your file to the pd shell correctly.<br>


<br>[read your-file.txt]<br>|   [print(  &lt;-- this is a message<br>| /<br>|/<br>|  [bang] &lt;-- hit this to read,.<br>| /<br>|/<br>[textfile]<br>|<br>|<br>[print list]<br><br>And it works. Take a look at the help file, it shows hot to use it. I hope I&#39;m understanding your issue, if not, hopefully someone does :)<br>


<br>Best of luck,<br>Pedro<br>p.s: remember to use the &quot;rewind&quot; message to textfile, because otherwise it doesn&#39;t read the line again! Because it moves forward with the seek file pointer.<br><br></div>
<div>On Tue, Jun 29, 2010 at 10:37 PM, thomas thiery &lt;<a href="mailto:matohawk@gmail.com" rel="nofollow" target="_blank">matohawk@gmail.com</a> &lt;mailto:<a href="mailto:matohawk@gmail.com" rel="nofollow" target="_blank">matohawk@gmail.com</a>&gt;&gt; wrote:<br>


<br>   Hi pd-list,<br><br>   test this patch, I saw a curious problem. I need to read line with<br>   &quot;float&quot; at the begining of a line and textfile can&#39;t do this.<br>   It&#39;s a pity<br><br>   --     Matohawk alias Th-Th<br>


</div>   <a href="http://www.th-th.fr/" rel="nofollow" target="_blank">www.th-th.fr</a> &lt;<a href="http://www.th-th.fr" target="_blank">http://www.th-th.fr</a>&gt;<br><br>   _______________________________________________<br>


   <a href="mailto:Pd-list@iem.at" rel="nofollow" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" rel="nofollow" target="_blank">Pd-list@iem.at</a>&gt; mailing list 
<div><br>   UNSUBSCRIBE and account-management -&gt;<br>   <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br><br><br>-- <br>Pedro Lopes<br></div>


contacto: <a href="mailto:jazz@radiozero.pt" rel="nofollow" target="_blank">jazz@radiozero.pt</a> &lt;mailto:<a href="mailto:jazz@radiozero.pt" rel="nofollow" target="_blank">jazz@radiozero.pt</a>&gt; 
<div><br>website: <a href="http://web.ist.utl.pt/Pedro.Lopes" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a><br></div></blockquote><br>
<div>
<div></div>
<div><br>_______________________________________________<br><a href="mailto:Pd-list@iem.at" rel="nofollow" target="_blank">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" rel="nofollow" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>


</div></div></blockquote></div><br><br clear="all"><br>-- <br>Pedro Lopes<br>contacto: <a href="mailto:jazz@radiozero.pt" rel="nofollow" target="_blank">jazz@radiozero.pt</a><br></div></div>
<div>
<div></div>
<div>website: <a href="http://web.ist.utl.pt/Pedro.Lopes" rel="nofollow" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a> <br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Pedro Lopes<br>contacto: <a href="mailto:jazz@radiozero.pt" rel="nofollow" target="_blank">jazz@radiozero.pt</a><br>


website: <a href="http://web.ist.utl.pt/Pedro.Lopes" rel="nofollow" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a> <br></div></div></div></div></div><br>







      </div></blockquote></div><br><br clear="all"><br>-- <br>Pedro Lopes<br>contacto: <a href="mailto:jazz@radiozero.pt" target="_blank">jazz@radiozero.pt</a><br>website: <a href="http://web.ist.utl.pt/Pedro.Lopes" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a> <br>