RE: Drag and Drop in Tkx
[email protected] ("Konovalov, Vadim (Vadim)** CTR **")
| Newsgroups | perl.tcltk |
|---|---|
| Message-ID | <35BF8D9716175C43BB9D67CA60CC345E1220F6DC@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com> |
> Another, elder way, which I do not prefer anymore, uses
> Tcl::Tk syntax, and technically it is absolytely the same.
>
> $interp->packageRequire('tkdnd','2.0');
>
> my $w_curdir =
> $frame->Entry(-textvariable=>\$var)->pack(-side=>'left',-expan
> d=>1,-fill=>'x');
> $interp->tkdnd__drop_target(register => $w_curdir, "*");
> $w_curdir->bind('<<Drop:DND_Files>>', \\'D', sub {
> my (undef,undef,undef,$data) = @_;
> ($$cwd_r) = $interp->SplitList($data);
sorry,
forgot to change variable name in second place... the line should be
($var) = $interp->SplitList($data);
> });
and see this "my (undef,undef,undef,$data) = @_;" - that's our discussed junk in callbacks :)
BR,
Vadim.