LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2018, 08:06 AM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,161

Rep: Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992
TCL - signal command overloaded by Tclx, namespace clash?


In some code I have used the signal command. This is from the package Signal. Which works very well, but I believe it is difficult to find and hardly used.

Anyway, I have some code using this signal command. While reusing old code and having the need of including Tclx the signal command cannot be used anymore.

I believe it is overloaded by the signal command from the Tclx package, which has a different syntax:
Code:
% package require Signal
1.4.0.1
% signal add SIGHUP {exit}
% package require Tclx
8.4
% signal add SIGHUP {exit}
command may not be specified for "add" action
The problem is of course that the old code is tested and for the Tclx signal function I'd have to rewrite parts.

This looks like a namespace clash. Unfortunately the signal function from Signal does not seem to have its own namespace.
Code:
% package require Signal
1.4.0.1
% signal add SIGHUP {exit}
% namespace origin signal
::signal
I would have expected to be able to use Signal::signal to call the right function.

Is this a limitation in Tcl? As in Tcl does not support namespaces like Python does?

Is there a solution?

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with executing a hell command from tcl Jykke Programming 1 04-25-2014 09:56 AM
ping command not working in tcl/tk? Passions Programming 2 02-17-2010 05:24 PM
tcl 'signal' or 'event' help (not sure what its called) zidane_tribal Programming 0 03-30-2006 12:30 PM
Tcl/Tk Bracket Problems in Command Kenji Miyamoto Programming 0 06-26-2005 11:29 PM
Tcl/Tk - command < entry > question. liguorir Linux - Software 0 05-06-2004 10:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration