[PD] drag and drop files in pd ?

Hans-Christoph Steiner hans at at.or.at
Thu Dec 23 04:04:49 CET 2010


I found some vague information about TkDND only really working with KDE,
and maybe in specific cases of GNOME.  I don't have more info.  It was
in the README I think.  but good to hear it works in Windows at least,
and its supposed to work in Mac OS X now.

.hc

On Thu, 2010-12-23 at 02:27 +0100, patko wrote:
> It just drag a file icon from explorer to pd patch and it create the box on the patch, nothing more.
> I can't capture my windows screen, it's a boring mess, maybe on ubuntu in a few hours...
> 
> what's wrong with tkdnd? Did you merge pkgindex.tcl  content from tktdnd archive into /usr/local/lib/tk8.5 pkgIndex.tcl file?
> 
> mine looks like this:
> 
> if {[catch {package present Tcl 8.5.0-8.6}]} { return }
> package ifneeded Tk 8.5.7	[list load [file join $dir .. .. bin tk85.dll] Tk]
> 
> 
> package ifneeded tkdnd 2.2 \
>   "source \{$dir/tkdnd.tcl\} ; \
>    tkdnd::initialise \{$dir\} libtkdnd2.2[info sharedlibextension] tkdnd"
> 
> the doc also say that:
> 
> Unix: Dragging from Tk windows has not yet been implemented. 
> 
> ----- "Hans-Christoph Steiner" <hans at at.or.at> a écrit :
> 
> > pdtk_canvas_makeobjs could put the full path to any abstraction and
> > it
> > would work.  I was thinking of something more elaborate: have the GUI
> > parse the abstraction that is dropped onto the patch, then paste it
> > in
> > where the abstraction was dropped on the patch.  I haven't gotten
> > TkDND
> > working, so I haven't tried anything yet.  I'd love to see what you
> > can
> > get working with it, I think TkDND could provide some really nice
> > functionality.
> > 
> > .hc
> > 
> > On Wed, 2010-12-22 at 23:44 +0100, patko wrote:
> > > Hello,
> > > 
> > >  I've just tested the 2.2 dll release of tkdnd, it seems the method
> > has changed,
> > > and figured it out by reading this doc:
> > > 
> > >
> > http://www.ellogon.org/petasis/tcltk-projects-mainmenu-38/tkdnd-mainmenu-39/tkdnd-man-page-mainmenu-44
> > > 
> > > we need to use capitals for bindings so, this line:
> > > 
> > >     catch {
> > >         dnd bindtarget $name.c text/uri-list <Drop> \
> > >             "pdtk_canvas_makeobjs $name %D %x %y"
> > >     }
> > > 
> > > now should look like this:
> > > 
> > >     catch {
> > >         dnd bindtarget $name.c text/uri-list <Drop> \
> > >             "pdtk_canvas_makeobjs $name %D %X %Y"
> > >     }
> > > 
> > > This is quite a weird change, but now it's working like this...
> > > 
> > > It would be great if pdtk_canvas_makeobjs would be able to put an
> > abstraction from folders that haven't been declared in pdsettings,
> > > but is it possible?
> > > 
> > > 
> > > 
> > > 
> > > ----- "Hans-Christoph Steiner" <hans at at.or.at> a écrit :
> > > 
> > > > Have you had any luck with tkdnd?  I tried it with Ubuntu/GNOME
> > and  
> > > > couldn't get it to work.  It would be very nice to have
> > drag-n-drop.
> > > > 
> > > > .hc
> > > > 
> > > > On Nov 7, 2010, at 1:13 AM, patko wrote:
> > > > 
> > > > > hello,
> > > > >
> > > > > the drag'n'drop tcl command is implemented for opening pd files,
> > if 
> > > > 
> > > > > you are curious look for this code in pd.tk:
> > > > >
> > > > > catch {
> > > > >    package require tkdnd
> > > > >    dnd bindtarget . text/uri-list <Drop> {
> > > > >        foreach file %D {open_file $file}
> > > > >    }
> > > > > }
> > > > >
> > > > > you will need to install tktdnd lib to try out this GUI
> > feature.
> > > > >
> > > > > It would be nice to have externals using this lib.
> > > > >
> > > > > ----- "tep" <tep.core at gmail.com> a écrit :
> > > > >
> > > > >> i'm looking for a way to drag and drop files in linux (ubuntu),
> > in
> > > > >> order to get the path of the file (in the manner of the
> > [dropfile]
> > > > >> object in maxmsp) and possibly the filetype ?
> > > > >>
> > > > >> --
> > > > >>
> > > > >>
> > > > >>
> > > > >> _______________________________________________
> > > > >> Pd-list at iem.at mailing list
> > > > >> UNSUBSCRIBE and account-management ->
> > > > >> http://lists.puredata.info/listinfo/pd-list
> > > > >
> > > > > -- 
> > > > > Patrice Colet
> > > > >
> > > > > _______________________________________________
> > > > > Pd-list at iem.at mailing list
> > > > > UNSUBSCRIBE and account-management ->
> > > > http://lists.puredata.info/listinfo/pd-list
> > > > 
> > > > 
> > > > 
> > > >
> > ----------------------------------------------------------------------------
> > > > 
> > > > I spent 33 years and four months in active military service and
> > during
> > > >  
> > > > that period I spent most of my time as a high class muscle man for
> > Big
> > > >  
> > > > Business, for Wall Street and the bankers.      - General Smedley
> > > > Butler
> > >
> 





More information about the Pd-list mailing list