[PD-dev] pddp style guide

Hans-Christoph Steiner hans at eds.org
Sun May 1 17:06:43 CEST 2005

On May 1, 2005, at 6:43 AM, Krzysztof Czaja wrote:

> hi again,
> Hans-Christoph Steiner wrote:
> ...
>> As for HTML docs, I don't understand why you want to separate the   
>> patches from the text.  Yes, the text formatting abilities of Pd are
> but you want them separate too...  a reference page should be
> kept in a separate window anyway, so what is wrong about that
> window being controlled by another application?

If we can do it in Pd, why not do it in Pd?  The example patches that  
go with the text would need to be opened from the browser (or  
whatever).  There are a number of problems with launching .pd files  
from other applications, many of which are platform-specific and  
browser-specific.  For example, on MacOSX, if you double-click a .pd  
file and Pd is not running, it loads the .pd file first, before loading  
the .pdrc or the prefs.  So it'll the patch will throw errors if it  
needs anything from a non-standard path or a lib.  This might affect  
other platforms too.

Plus, I think MacOSX is the only platform that automatically gets the  
file associations set up by Pd.  On GNU/Linux and Windows, you need to  
manually create the file associations.  That means for newbies, we'd  
have a lot of requests on the lists of how to do that.  And each OS and  
each browser does it differently.  Plus GNOME and KDE do it differently  
as well.  If we write the references in Pd, we don't need to do  
anything to have the example patches launch in Pd.

> However, my point is not about using a web browser, but about
> storing a reference page as a single parsable resource, instead
> of breaking it into several unparsable comments (same goes for
> any other type of longer self-contained text).

I am not sure what you mean by "unparsable comments".  Using a  
multi-line regexp, you can grab all chunks that start with '#X text  
[0-9-]* [0-9-]*' and ends with a non-escaped ';'.    The '#X text  
[0-9-]* [0-9-]*' would be equivalent to an HTML <p> and ';' to a </p>   
Start that comment with a keyword, they its quite easy to assign that  
text to that keyword in a hash or whatever.  The regexps could be used  
in Tcl to be cross-platform.  I don't think it'd be any harder to parse  
a .pd file than it would be to parse a .html file for our uses.


> The way it is displayed is quite another matter.  I am proposing
> the external browser, as the easiest, and the most
> old-fashioned-Pdish way to do it.  Another option is including
> some kind of a browser widget in pd-gui, which you seem proposing:
> ...
>> of that.  With a little more work on the [comment] object, I think we  
>>  could have all of the text formatting capabilities that we'd really   
>> need to make very nice, linked help patches with texts, all within  
>> Pd.
> Krzysztof



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2353 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20050501/e139b942/attachment.bin>

More information about the Pd-dev mailing list