[PD] external viewers for additional file types ?

Pete Redest postal759 at hotmail.com
Tue Mar 13 05:11:17 CET 2007


ok. it doesnt use tk_fileChooser, but the code is in u_main.tk.
The function menu_doc_open does some minimal parsing and
invokes one of just 3 handlers.

I will think some more how to handle this. Also, my observation of
incorrect parsing of the .pdf suffix is not what is happening, but
rather that as-is, the code will open with pd anything that is not
.txt .c or .html.

Probably the easiest would be to launch an external script that
incorporates the added "viewer" table lookup or something like
that. Or add the table lookup right into u_main.tk. I don't know
much Tcl/Tk so ... will see. Will get to it sometime soon.
Thanks!
-Peter


>From: "Pete Redest" <postal759 at hotmail.com>
>To: _ at whats-your.name, pd-list at iem.at
>Subject: Re: [PD] external viewers for additional file types ?
>Date: Tue, 13 Mar 2007 03:19:48 +0000
>
>Will take a look at the code and check for use of tk_fileChooser - may
>be someone has more specific info I can use.
>
>BTW, I am guessing that the particular bad behavior when clicking on a
>PDF file, is that there is a bug in the browser, whereby it takes the ".pd"
>of the ".pdf" suffix and "believes" it is a PD file, then tries to open it 
>in
>PD. That looks at first as a "hang" but if I wait 2 minutes, I see a lot of
>binary-printed insults in the PD log area, like:
>.....
>GEM: with help by Guenter Geiger, Daniel Heckenberg, Cyrille Henry, et al.
>GEM: using MMX optimization
>error: %PDF-1.3: no such object
>error: ?????l?à?Ù\}gßf??Õ\}???ûýòÇæÃõ]vê?dEÆÓB: no such object
>..... etc ad-infinitum (well, not really infinitum: a few thousand lines 
>like that).
>
>
>>From: carmen <_ at whats-your.name>
>>To: pd-list at iem.at
>>Subject: Re: [PD] external viewers for additional file types ?
>>Date: Mon, 12 Mar 2007 02:48:51 -0400
>>
>> > Is there a way to define external viewers for files, e.g. a list of the
>> > kind:
>> > pdf    /usr/bin/acroread
>> > text   /usr/bin/gvim
>> > mov  /usr/bin/xine
>> > txt     internal
>> > [mM]akefile internal
>> > TODO internal
>> > ....
>> > Get the drift?. If there isn't such capability
>>
>>theres something like this for gnome, where if you run 'gnome-remote 
>>/path/to/some.pdf' it will launch evince. osux has something similar, 
>>called 'open' i think. on windows, im not sure what you do, maybe 'exec 
>>explorer.exe filename'..
>>
>>im pretty sure pd just uses the tk_fileChooser so youre going to have to 
>>figure out how to override its default somehow.. maybe check the tk docs? 
>>and check pd.tk. its surely no more than a few lines to do what you want, 
>>on all the platforms..
>>
>>_______________________________________________
>>PD-list at iem.at mailing list
>>UNSUBSCRIBE and account-management -> 
>>http://lists.puredata.info/listinfo/pd-list
>
>_________________________________________________________________
>With tax season right around the corner, make sure to follow these few 
>simple tips. 
>http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline
>
>


>_______________________________________________
>PD-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> 
>http://lists.puredata.info/listinfo/pd-list

_________________________________________________________________
Find what you need at prices you’ll love. Compare products and save at MSN® 
Shopping. 
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102&tcode=T001MSN20A0701





More information about the Pd-list mailing list