[PD-dev] Ignoring '5401': doesn't look like a Pd-file

Hans-Christoph Steiner hans at at.or.at
Thu Jan 14 20:35:21 CET 2010


On Jan 14, 2010, at 3:51 AM, IOhannes m zmoelnig wrote:

> Hans-Christoph Steiner wrote:
>> Hey,
>>
>> Everytime I run pd 0.43 from the command line like ./pd, I get this:
>>
>> Ignoring '5401': doesn't look like a Pd-file
>
> yes, here too :-)
> and i even know where it comes from...
> when you call "./pd-gui.tcl <somefile.pd>", it will request  
> somefile.pd
> to be opened (by calling "open_file{}"
> if you call "./pd-gui.tcl 5400" it will connect to a running Pd on  
> port
> 5400, but it will _also_ think that "5400" is a file to open, and call
> "open_file 5400"
> then "open_file{}" will do a check whether and will only ask Pd-core  
> to
> open the file if it ends with .pd/.pat/.mxt.
> since 5400 does not match this criterion it will be discarded.
>
> this is how it has been before i modified the source.
> nobody noticed, because open_file silently dropped the "illegal" file.
>
> what i did is, that i added a warning, if open_file{} discards a file
> (because it does not end with .pd/...)
> i think this is good, because it tells us, that we are using a bad  
> hack
> here: we are mixing 2 concepts
> - the check in open_file{} is there to prevent "bad" files to be  
> opened.
> - if we call "./pd-gui.tcl 5400" we don't want to specify a file, but
> instead a port! we know that this is a port, because it is a number.  
> we
> should not call open_file{} with something which we already know is  
> not
> a file.
> so the check has to be done way earlier in the process.
>
> in the meantime i prefer to see the warning (a constant reminder of  
> the
> quirk) rather than drop it.
>
> one could use the new ::pdwindow::verbose{} rather than post{}.
> but really the underlying problem should be fixed sooner than later.


Warnings that happen every time rapidly become meaningless, and  
therefore a pointless annoyance. Much better is to fix the underlying  
problem:

http://pure-data.svn.sourceforge.net/viewvc/pure-data?view=rev&revision=12996

.hc

----------------------------------------------------------------------------

Man has survived hitherto because he was too ignorant to know how to  
realize his wishes.  Now that he can realize them, he must either  
change them, or perish.    -William Carlos Williams






More information about the Pd-dev mailing list