f



Need help on tcl/tk drag/drop

Hi,

I need to drag/drop a link in a browser to a tk textbox, where the
link name, and link URL get copied at the end of the drag.

The behavior is similar to that seen on dragging a link on an IE or
Firefox loaded page to the address bar. This action copies the url to
the address bar and navigates the browser to that URL. The difference
is, this is across apps, whereas in my case, the source is a browser,
and target is tk window.

Any pointers on where to look at? Any code examples?

Thanks in advance,
--Parikshit N. Samant.
0
samantp (2)
7/16/2009 9:19:08 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

4 Replies
631 Views

Similar Articles

[PageSpeed] 49

O/H Parikshit έγραψε:
> Hi,
> 
> I need to drag/drop a link in a browser to a tk textbox, where the
> link name, and link URL get copied at the end of the drag.
> 
> The behavior is similar to that seen on dragging a link on an IE or
> Firefox loaded page to the address bar. This action copies the url to
> the address bar and navigates the browser to that URL. The difference
> is, this is across apps, whereas in my case, the source is a browser,
> and target is tk window.
> 
> Any pointers on where to look at? Any code examples?
> 
> Thanks in advance,
> --Parikshit N. Samant.

Under what platform?
I think your best bet is tkdnd...

http://wiki.tcl.tk/2768

http://www.ellogon.org/petasis/content/view/23/39/
http://www.ellogon.org/petasis/content/view/28/44/

George


0
petasis (1405)
7/16/2009 9:28:11 AM
O/H Georgios Petasis έγραψε:
> O/H Parikshit έγραψε:
>> Hi,
>>
>> I need to drag/drop a link in a browser to a tk textbox, where the
>> link name, and link URL get copied at the end of the drag.
>>
>> The behavior is similar to that seen on dragging a link on an IE or
>> Firefox loaded page to the address bar. This action copies the url to
>> the address bar and navigates the browser to that URL. The difference
>> is, this is across apps, whereas in my case, the source is a browser,
>> and target is tk window.
>>
>> Any pointers on where to look at? Any code examples?
>>
>> Thanks in advance,
>> --Parikshit N. Samant.
> 
> Under what platform?
> I think your best bet is tkdnd...
> 
> http://wiki.tcl.tk/2768
> 
> http://www.ellogon.org/petasis/content/view/23/39/
> http://www.ellogon.org/petasis/content/view/28/44/
> 
> George
> 
> 

Hm, now that I visited the web page: http://sourceforge.net/projects/tkdnd/
There are quite many "artifacts" :-) I haven't been there for a while, 
but seems that SF does not notify when a new one is added :D

George
0
petasis (1405)
7/16/2009 9:31:37 AM
On Jul 16, 2:31=C2=A0pm, Georgios Petasis <peta...@iit.demokritos.gr>
wrote:
> O/H Georgios Petasis =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
>
>
>
>
>
> > O/H Parikshit =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
> >> Hi,
>
> >> I need to drag/drop a link in a browser to a tk textbox, where the
> >> link name, and link URL get copied at the end of the drag.
>
> >> The behavior is similar to that seen on dragging a link on an IE or
> >> Firefox loaded page to the address bar. This action copies the url to
> >> the address bar and navigates the browser to that URL. The difference
> >> is, this is across apps, whereas in my case, the source is a browser,
> >> and target is tk window.
>
> >> Any pointers on where to look at? Any code examples?
>
> >> Thanks in advance,
> >> --Parikshit N. Samant.
>
> > Under what platform?
> > I think your best bet is tkdnd...
>
> >http://wiki.tcl.tk/2768
>
> >http://www.ellogon.org/petasis/content/view/23/39/
> >http://www.ellogon.org/petasis/content/view/28/44/
>
> > George
>
> Hm, now that I visited the web page:http://sourceforge.net/projects/tkdnd=
/
> There are quite many "artifacts" :-) I haven't been there for a while,
> but seems that SF does not notify when a new one is added :D
>
> George- Hide quoted text -
>
> - Show quoted text -

Hi George,

TkDnd works well for me, on windows XP. The only issue is for my
specific usecase. I need to drag and drop links from IE or firefox, to
a tk textbox UI. TkDND allows me to drag and drop text from these
browsers to tk UI seamlessly. But the ole types for IE links is not
supported in tkdnd right now. I went through the sources, and figured
out the need to change tkdnd to support this type. Hopefully, I should
be able to do that.

Regards,
--Parikshit N. Samant.
0
samantp (2)
7/28/2009 2:57:47 AM
On 28 juil, 04:57, Parikshit <sama...@gmail.com> wrote:
> On Jul 16, 2:31=C2=A0pm, Georgios Petasis <peta...@iit.demokritos.gr>
> wrote:
>
> > O/H Georgios Petasis =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
>
> > > O/H Parikshit =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
> > >> Hi,
>
> > >> I need to drag/drop a link in a browser to a tk textbox, where the
> > >> link name, and link URL get copied at the end of the drag.
>
> > >> The behavior is similar to that seen on dragging a link on an IE or
> > >> Firefox loaded page to the address bar. This action copies the url t=
o
> > >> the address bar and navigates the browser to that URL. The differenc=
e
> > >> is, this is across apps, whereas in my case, the source is a browser=
,
> > >> and target is tk window.
>
> > >> Any pointers on where to look at? Any code examples?
>
> > >> Thanks in advance,
> > >> --Parikshit N. Samant.
>
> > > Under what platform?
> > > I think your best bet is tkdnd...
>
> > >http://wiki.tcl.tk/2768
>
> > >http://www.ellogon.org/petasis/content/view/23/39/
> > >http://www.ellogon.org/petasis/content/view/28/44/
>
> > > George
>
> > Hm, now that I visited the web page:http://sourceforge.net/projects/tkd=
nd/
> > There are quite many "artifacts" :-) I haven't been there for a while,
> > but seems that SF does not notify when a new one is added :D
>
> > George- Hide quoted text -
>
> > - Show quoted text -
>
> Hi George,
>
> TkDnd works well for me, on windows XP. The only issue is for my
> specific usecase. I need to drag and drop links from IE or firefox, to
> a tk textbox UI. TkDND allows me to drag and drop text from these
> browsers to tk UI seamlessly. But the ole types for IE links is not
> supported in tkdnd right now. I went through the sources, and figured
> out the need to change tkdnd to support this type. Hopefully, I should
> be able to do that.
>
> Regards,
> --Parikshit N. Samant.

I asked me the same question :
I see the solution there
http://users.iit.demokritos.gr/~petasis/Tcl/tkDND/tkDND_Manual.html

This works for me with Mozilla (Not IE7, which says UntrustedDragDrop)

pack [text .t]
dnd bindtarget .t UniformResourceLocator <Drop> {}
bind .t  <<DropEnter>> {list copy}
bind .t <<DropPosition>> {list copy}
bind .t <<DropLeave>>
bind .t <<Drop>> {%W insert end [string range %D 0 end-1]}

Regards, Florent Merlet
0
9/5/2009 7:27:48 AM
Reply:

Similar Artilces:

[TCL/TK interface] Passing variable to TCL/TK
Hi, I am trying to sent to a variable to tcl/tk and unify there it with a string. I wrote the prolog code: :- use_module(library(tcltk)). :- use_package(classic). go(A):- tk_new([name('Simple')], Tcl), tcl_eval(Tcl, 'source simple2.tcl', _), tcl_eval(Tcl, ['ask', br(write(A))], _), tk_main_loop(Tcl), tcl_delete(Tcl). and the tcl file simple2.tcl proc ask {var} { unify_term $var my_value } unfortunatelly when I query for go(S). the interpeter goes into a loop (!?). Where I am wrong. Are there any example code somewhere i...

[Tcl/Tk Community] We need *urgent* advertisement among CS students about Tcl in GSoC 2009
Hi! I'm Tomasz Kosiak. This year I have an honor to officially serve as an administrator for Tcl/Tk Community involvement in Google Summer of Code 2009 program. I would like to ask all broad Tcl community members to help us reach students worldwide and encourage them to apply for a summer scholarship. If you have never heard of Google Summer of Code (aka GSoC) it is a Google, Inc. sponsored initiative to fund aproximately 1000 student scholarship $4500 each for coding during a summer for ideas freely chosen by approved open-source organization. Tcl/Tk community is approved again by Google this year (second time). We seek opportunities to advertise among CS students our GSoC project ideas. That is why I have prepared one slide info about Tcl/Tk and GSoC. This e-mail can be freely forwarded directly to prospective students or to your fellow university teachers so they can show this slide for their students. The goal is to reach students worldwide willing to apply to Tcl/Tk as mentoring organization. See Tcl/Tk GSoC 2009 in a pill at http://tinyurl.com/tcl-gsoc2009 and this is the only URL students shall write down to get started. Official news about Tcl/Tk GSoC 2009 is at http://www.tcl.tk/gsoc/ and http://wiki.tcl.tk/22182. We, Tcl mentors and admins, are really willing to help students prepare their applications. This is what our community is fond of. As last year we *do* plan to act as umbrella organization for other Tcl-related projects like Tk, XOTcl, Expect, AO...

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not found... Here's the deal... Since I'm working within the ANSYS implementation of Tcl-Tk, I'm actually using an ANSYS command to open the second window. The command I use is: ### ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' ### It actually sends a command back to ANSYS telling it to execute a Tcl command... I know this is not pretty but its the only way i was able to make it at least show the window. ############################## #Main Tcl (excerpt): ############################## namespace eval Tools { proc IBRCambpell {} { #source O:/mad_projects_2/ANSYS/Macros/IBR_CAS.tcl ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' } proc viewManager {} { ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ ViewManager.tcl' } proc powerAnnotation {} { ans_sendcommand ~eui,'source ...

Debugger for Tcl/Tk and [incr Tcl]
hi, where can i get Coverage for debugging tcl/tk, [incr Tcl] source? this tool is advised to use in 'Practical Programming in Tcl and Tk' or any other good debugger, which i could use? best, s. On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > hi, > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > or any other good debugger, which i could use? I see, at http://wiki.tcl.tk/8638 , a brief reference to the topic of coverage for tcl. I don't know whether or not any of the tools mentioned include coverage of itcl. On 23 jan, 12:52, "Larry W. Virden" <lvir...@gmail.com> wrote: > On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > > > hi, > > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > > or any other good debugger, which i could use? > > I see, athttp://wiki.tcl.tk/8638, a brief reference to the topic of > coverage for tcl. I don't know whether or not any of the tools > mentioned include coverage of itcl. I have a more complete version of the coverage tool mentioned on that page. I just never got around to publishing it more widely. As for debuggers: the Wiki has a lot of pointers on that subject as well. Regards, Arjen Larry W. Virden wrote:...

TCL Need help
Hi, I have a simple script like this. set i 1; puts "i=$i" while $i<=10 { puts i=$i;set i 11 } I have not put curly braces after while. When I run this script it enters into indefinite while loop which according to one of the book "The reason is that the Tcl interpreter will substitute for $i before while is called, so while gets a constant expression 1<=10 that will always be true.". But when i print the value of "i" it is printed as 11. So how does the substitution happens here.Any idea on this. Regards, -srini. Srinivas Kandalam wrote: > set i 1;...

Help on TCL TK
Hi All, I am very new to tcl tk... need to develop a gui in which input will be a .tcl file(user needs to give path) with some data. Few data needs to be copied and saved in a file with .txt format. please help.... Thank you... On Oct 23, 11:57=A0am, pooja <pmitr...@gmail.com> wrote: > Hi All, > I am very new to tcl tk... > need to develop a gui in which input will be a .tcl file(user needs to > give path) with some data. > Few data needs to be copied and saved in a file with .txt format. > please help.... > > Thank you... Let's see - visit http://www.tcl.tk/ and read the pages that talk about what Tcl and Tk is, how to download ActiveTcl, etc.. Visit http://wiki.tcl.tk/ to get some pointers on books and tutorials that are available to teach you the language. I am not certain, however, where to point you to learn about how to write a program, using a GUI program as the first attempt. Perhaps someone here can help. I can recommend, however, that a really good first step for you to take would be to first sketch out - perhaps just in text - how you want the windows to look, how many windows you want, what kinds of information the user will be asked, what kinds of information you will be displaying. The more you sketch out the appearance of the menus, etc. the easier it is going to be when you get to the point of writing code. Get the inputs and outputs requirements in great detail. Then, the next step I would recommend is to write out, in ...

Incr Tcl /Tk for Tcl 8.4
Hi, I am trying to download incr Tcl and incr Tk for Tcl/Tk 8.4.19. I looked at: http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-source/3.4.1/ But only itcl seems to be there. And the CVS doesn't have the 3.4.1 tag. Do you know where I can get incr Tk and hopefully a corresponding iwidgets? Thanks, Andres On 5 Okt., 11:16, Andres Garcia <tclc...@gmail.com> wrote: > Hi, > > I am trying to download incr Tcl and incr Tk for Tcl/Tk 8.4.19. > > I looked at: > > http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-sou... > > But only itcl seems to be there. And the CVS doesn't have the 3.4.1 > tag. There is no tag for this version. But you can use a date. cvs -d :pserver:anonymous@incrtcl.cvs.sourceforge.net:/cvsroot/incrtcl -z3 co -P -D 2010-10-28 incrTcl > > Do you know where I can get incr Tk and hopefully a corresponding > iwidgets? Itk is inside itcl sources. cvs -d :pserver:anonymous@incrtcl.cvs.sourceforge.net:/cvsroot/incrtcl -z3 co -P -D 2010-10-28 iwidgets HTH rene Thanks. Andres >> I am trying to download incr Tcl and incr Tk for Tcl/Tk 8.4.19. >> >> I looked at: >> >> http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-sou... >> >> But only itcl seems to be there. And the CVS doesn't have the 3.4.1 >> tag. The released sources for Itcl 3.4.1 were not developed in SF CVS. SF CVS got abandoned during the January...

E.J. Friedman-Hill's Tcl/Tk Course
E.J. Friedman-Hill's Tcl/Tk Course Tcl/Tk Programming in Five Easy Lessons http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/ I am unable to open the ppt files that seem very promising. Can anyone see what is the problem with them and can convert/fix so that I can open in the office 2007 or open office ? Thanks Bolega On 24/03/2011 2:51 AM, bolega wrote: > E.J. Friedman-Hill's Tcl/Tk Course > Tcl/Tk Programming in Five Easy Lessons > > http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/ > > I am unable to o...

Tcl SOAP
OK - Believe it or not, I have a "requirement" to use SOAP! The last time I worked with this, it did not work at all. So the following quesitons come to mind: Has it improved any - and it is working on Tcl 8.4.1 or later? Anyone using it for connecting to Web Services? Anyone using it to provide Web Services? I will immediately need to connect to a Web Service using SOAP (this is the "only" option), and then later provide Web Services via Apache (1.3 likely, but will migrate to 2.0x if necessary). Any guidance or suggestions would be most welcomed! Dave In article <e45f1db4.0405281105.8d1b86e@posting.google.com>, Dave Bigelow <davidhbigelow@simplifiedlogic.com> wrote: >OK - > >Believe it or not, I have a "requirement" to use SOAP! > >The last time I worked with this, it did not work at all. So the >following quesitons come to mind: > >Has it improved any - and it is working on Tcl 8.4.1 or later? >Anyone using it for connecting to Web Services? >Anyone using it to provide Web Services? > >I will immediately need to connect to a Web Service using SOAP (this >is the "only" option), and then later provide Web Services via Apache >(1.3 likely, but will migrate to 2.0x if necessary). > >Any guidance or suggestions would be most welcomed! > >Dave Short answer: yes. What does "immediately" mean to you? What platforms interest you? I'm working with t...

need help with tcl tcom
Hello all I always get the 0x80010105 {The server threw an exception.} error with the following code . set cdbLength [expr 10] set cdbData [expr [list "[expr 0xC0] [expr 0x81] [expr 0x2D] [expr 0x01] [expr 0] [expr 0] [expr 0] [expr 0] [expr 0] [expr 0]"]] set sendLength [expr 0] set sendData [expr 0] set receiveLength [expr 0] $drv GenericCDB $cdbLength $cdbData $sendLength $sendData $receiveLength and my interface methods is: method 7 VARIANT GenericCDB { {in I2 cdbLength} {in {VARIANT *} cdbData} {in INT sendLength} {in {VARIANT *} sendData} {in INT receiveLength} } Could you ...

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

[HELP] tcl/tk for winodws
I'm looking for a windows explorer in tk, similar to tkdesk written for unix. Does anybody have a similar scripts or know where I can download it from? Please help. Thank you in advanced Regard, /Steve Steve Lam wrote: > I'm looking for a windows explorer in tk, similar to tkdesk written for > unix. Does anybody have a similar scripts or know where I can download it > from? There are numerous variants available, but are you just looking for an app, or the components which would create such an app? The Tcl Dev Kit has the VFS Explorer, which is cross-platform and should...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Tcl/Tk variable help
Hi, This is part of my code: I'd like to use "unitname" as global var in my whole script. Any ideas? # set btn_unit [ button .reltop.unit.lblf.btn_lef -image opn -command { set unitname [tk_chooseDirectory -title "Select Unit" -initialdir $env(PROJ_HOME)] if { $unitname != "" } { set REL_UNIT [pwds $unitname] $ent_unit configure -bg white } else { set REL_UNIT "_UNITNAME_" $ent_unit configure -bg red } } ] # Thanks, G On 7 jul, 14:37, Guy <gelimel...@gmail.com> wrote: > Hi, > > This is part of my code: > I'd like to use "unitname" as global var in my whole script. > Any ideas? > > # > set btn_unit =A0[ button .reltop.unit.lblf.btn_lef -image opn -command { > =A0 =A0 =A0 =A0 set unitname [tk_chooseDirectory -title "Select Unit" -in= itialdir $env(PROJ_HOME)] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if { $unitname !=3D "" } { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 set REL_UNIT [pwds $unitn= ame] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ent_unit= =A0 =A0configure -bg white > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 set REL_UNIT "_UNITNAME_" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ent_unit= =A0 =A0configure -bg red > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }} ] > > # > > Thanks, > G You can de...

WebServices in Tcl. Help needed.
Hi, I tried to use G.Lester's WebServices package with no success. I have no doubt about the quality of this package but i can't manage to get the right libraries to put it to work. tDOM is required. I found what is supposed to be the latest version (0.8.0) at http://www.tdom.org/ BUT this code does not work # works great dom parse $wsdlXML wsdlDoc $wsdlDoc documentElement wsdlNode # crash $wsdlDoc selectNodesNamespaces { w http://schemas.xmlsoap.org/wsdl/ d http://schemas.xmlsoap.org/wsdl/soap/ s http://www.w3.org/2001/XMLSchema } because the selectNode...

"Tk editor application template" [http://wiki.tcl.tk/8288]
I'm using Tk/Tcl 8.6.4 under WinXP Pro SP3 My learning style is to tweak something that is almost what I want until it is. I have three identified problems: 1. What is proper syntax to invoke when sourced from another script? [Works as expected when clicking on filename.] The code reads: #-------------------------------------------------- # Execute the main procedure #-------------------------------------------------- myAppMain $argc $argv However no reference to "argc" exists. 2. How do I add a functional "Find" com...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl project: tcl-mmap > > Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides > a Tcl package that allows Tcl scripts to: 1) Memory map files for > improved access efficiency; 2) Share memory between related processes; > 3) Easily implement cyclic persistent log files. > > * See the mmap(2) man page. > Great to see this and the other packages you made. Looking at the manpage it looks a bit misformatted before the usage example. Any specific reason to use GPL for this instead the usual Tcl/MIT/BSD style license used? Michael schlenk wrote: > On Sep 3, 11:48 am, Alexandros Stergiakis <alst...@gmail.com> wrote: >> This is an announcement for a relatively new Tcl project: tcl-mmap >> >> Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides >> a Tcl package that...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persistency. A message queue can be thought of as a linked list of messages. Threads with adequate permission can put messages onto the queue, and threads with adequuate permission can remove messages from the queue. Each message is assigned a priority by the sender, and the oldest message of highest priority is always retrieved first. Unlike PIPES and FIFOS, no requirement exists that someone be waiting for a message to arrive on a queue, before some process writes a message to that queue. It's not even a requirement for both processes to exist at the same time. Read mq_overview(7) for more details Platform: Linux Home page: http://sourceforge.net/projects/tcl-mp/ Man page: http://tcl-mp.sourceforge.net/ Author: Alexandros Stergiakis alsterg On Sep 3, 11:37=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl pro...

New tcl user needs help
Hi all Before I start - I am a very green tcl user to say the least so my questions may appear very basic, but would appreciate any help whatsoever. What I have is a form that asks for a number or range of numbers - in this case "section_range" and another two set of numbers "dis1" and "dis2" eg section_range could be entered - 6500 dis1 could be entered - 10 dis2 could be entered - 5 What I am after is a new variable which uses the entered values by a calculation - "low_n" and "high_n" eg. "section_range" - "dis1" I hav...

Need help understanding a TCL expression
Hi folks, I am new to the newsgroup, just started learning TCL. I have experience in various flavors of VB, C++ and Delphi. In TCL a few of the more cryptic regexp combinations have me scratching my head. Here's one from some example code I am trying to understand: if {![regexp -nocase "${match}(.*?)\r\n\1" $str str data]} {return 0} I've got the if NOT, -nocase, \r, \n and return 0 stuff Ok and I know $str is my input string to regexp. I can't seem to tie the stuff inside the quotes below all together and make good sense out of it: "${match}(.*?)\r\n\1&q...

Need help in using sed with TCL...
Hi, I need to replace a line with multiple lines like as shown below, # !/bin/sh #Script starts..! { #Script... } To replace the # !/bin/sh with multiple lines like # !/atc/bin/sh #Comment1 #comment2 #Script starts..! { #Script... } Can some one, please help in using sed command for the replacement as shown above. Thanks in advance.. Regards, Kumar O/H Kumar έγραψε: > Hi, > > I need to replace a line with multiple lines like as shown below, > > # !/bin/sh > #Script starts..! > { > #Script... > } > > To replace the # !/bin/sh with multiple lines like > > # !/atc/bin/sh > #Comment1 > #comment2 > #Script starts..! > { > #Script... > } > > Can some one, please help in using sed command for the replacement > as shown above. > > Thanks in advance.. > > Regards, > Kumar Why do you need sed for this? Since you are in tcl, you can use tcl directly and be more portable... proc replace_shell {filename} { set fd [open $filename] fconfigure $fd -encoding utf-8 set data [read $fd] close $fd set data [string map [list \ {# !/bin/sh} "# !/atc/bin/sh\n#Connent1...\n#Comment2" \ ] $data] set fd [open $filename w] fconfigure $fd -encoding utf-8 puts [string trim $data] close $fd };# proc replace_shell George ...

Help needed for writing Tcl script
Hi all, I am a newbie in Tcl. I want to write a script that does following 1) Logs in to the local host 2) Takes directory name as input (standard input) 3) checks if directory exists or not (for example dir name : ABC) 4) If exists, 4.1) creates directory at remote server (Named ABC) 4.2) transfers all file inside that directory to remote server (via FTP) 5) If does not exists, Show the message "Dir does not exist", and repeat step 2,3,4 5) takes another directory name as input and repeat step 3, 4, 5 until user do not specify any more dir names I am getting extremely confused. Any hard coded help would be best Please help me. Thanks In article <2efec80c-9989-405f-809e-b9cb3a132ad4@w24g2000prd.googlegroups.com>, kj <kinjaldesai2002in@gmail.com> wrote: >Hi all, > >I am a newbie in Tcl. I want to write a script that does following > >1) Logs in to the local host . . . What does this mean to you? Does "manual" telnet localhost model the behavior you have in mind? Why "log in" rather than, for example, invoke a new shell. I have the feeling your description doesn't capture everything afoot in your project. ...

Help !!! I need to install tcl in other computer !!!
Hi there! I' am a brazilian dumb programmer, so I need some strong help from you. (please ignore errors in this text) I have 2 questions: 1 - I need to develop for my boss an open-source application in windows that uses the Mk4tcl.dll (database for tcl), but I searched in all places and I did not found the place to put (folder or directory) this dll in tclpro.I have some success with tclkit.exe, I just put the library in the same folder of it and voil=E1! But with tclpro... I've tried to place in "lib" folder, but it does not work. If you know the steps to use this library ...

Web resources about - Need help on tcl/tk drag/drop - comp.lang.tcl

Trump, Supporters Undeterred by Protests
CLEVELAND – Tensions ran high at a Donald Trump rally here the day after the Republican front-runner canceled a Chicago appearance amid violent ...

1 Killed; 2 Others Presumed Dead in NY Tugboat Crash
A search for two missing crew members of a tugboat that crashed into a barge and sank in the Hudson River has stretched into another day

ABC Four Corners team arrested in Malaysia over reporting on corruption allegations
An ABC Four Corners crew is detained by Malaysian police after trying to question Prime Minister Najib Razak over a corruption scandal.

Nickelodeon’s 2016 Kids’ Choice Awards
Show host Blake Shelton is ‘slimed’ during Nickelodeon’s 2016 Kids’ Choice Awards in Inglewood, California. — Reuters pic

Officials say unrest at prison in Alabama leaves 2 hurt
Inmates set a fire, seized control of a dormitory and stabbed two corrections officials during a violent uprising at a prison in southern Alabama, ...

Why daylight saving time is so controversial
WITN Why daylight saving time is so controversial WITN It's that time of year again. On Sunday, most residents in the U.S., Europe, and several ...

Defeated Go world champion beats DeepMind AI in penultimate match
Machines 3, humans 1… That’s the current score in a five-match series being played out between DeepMind’s AlphaGo and human Go world champion, ...

Unusually widespread flooding across Louisiana, Mississippi
HATTIESBURG, Miss. (AP) — As the Leaf River rose north of Hattiesburg, Mississippi, 26-year-old Rebecca Bruce and her fiancé grabbed what they ...

Fans chant 'You killed Jesus' during high school basketball game
Officials at Catholic Memorial School apologize after some students chant anti-Semitic taunts during a basketball game against a school with ...

Germanwings crash probe recommends more medical checks for pilots
Paris (AFP) - The French probe into the crash of a Germanwings plane deliberately flown into a mountain by the co-pilot recommended more stringent ...

Resources last updated: 3/13/2016 11:29:10 AM