[PD] [bang(ing [openpanel]

odiv . daniel52000 at hotmail.com
Mon Jun 20 13:36:30 CEST 2005

>On Mon, Jun 20, 2005 at 12:46:48AM +0000, odiv . wrote:
> > hi list.
> >
> > I wonder if it was possible to avoid DSP switching off withing 5 secs, 
> > browsing for a file with [openpanel]
>i think that may be the watchdog. u could try making the open dialog 

unfortunately im not a programmer and im on winxp.
I found watchdog.
proc pdtk_watchdog {} {
    pd [concat pd ping \;]
    after x {pdtk_watchdog}
but changing x doesnt make any difference on DSP.

Could anyone give me a hint how to rewrite open dialog to nonmodal. I think 
it should be it:
proc pdtk_openpanel {target} {
    global pd_opendir
    set filename [tk_getOpenFile \
    	-initialdir $pd_opendir]
    if {$filename != ""} {
    	set directory [string range $filename 0 \
    	    [expr [string last / $filename ] - 1]]
    	set pd_opendir $directory

    	pd [concat $target symbol [pdtk_enquote $filename] \;]

many thanx in advance

Del din verden med MSN Spaces http://spaces.msn.com

More information about the Pd-list mailing list