Tk Library Source Code

View Ticket
Login
Ticket UUID: 817351
Title: error for new comm channels
Type: Bug Version: None
Submitter: hemanglavana Created on: 2003-10-03 18:55:59
Subsystem: comm Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-10-22 06:15:10
Resolution: Fixed Closed By: hobbs
    Closed on: 2003-10-21 23:15:10
Description:
The documentation example shows following usage to
create a new comm channel:

::comm::comm new ::comm::comm -port 0 -local 1 ...

However, when I try to specify ::comm::p2 as the
channel name, it fails to create the internal variables
correctly. If I specify p1 without full namespace, it
works properly. See the following interactive session:

hlavana-u5:64> tclsh
% package require comm
4.1
% ::comm::comm new p1 -port 0 -local 1 -listen 1
% p1 self
invalid command name "p1"
% ::comm::p1 self
40695
% ::comm::comm new ::comm::p2 -port 0 -local 1 -listen 1
% ::comm::p2 self
can't read "comm(p2,port)": no such element in array
%  ::comm::comm channels
::comm::comm p1 ::comm::p2

This looks like a bug to me.

Hemang.
User Comments: hobbs added on 2003-10-22 06:15:10:
Logged In: YES 
user_id=72656

see also 741653.

corrected with better namespace qualification for tcllib 1.5 
and comm 4.2.