#1969 delete trace doesn't pass FQ name

obsolete: 8.4b2
closed-fixed
5
2002-07-18
2002-07-16
Don Porter
No

% proc print args {puts $args}
% namespace eval ns {proc foo {} {}}
% trace add command ns::foo delete print
% namespace delete ns
foo {} delete

Note that the command deleted is reported
as "foo" instead of ::ns::foo . Imagine deleting
a top level namespace and tracing deletion
of many commands in many child namespaces.
This is not sufficient.

The problem traces to CallCommandTraces()
which uses Tcl_GetCommandName() to get
the name to pass when oldName is NULL.
It ought to call Tcl_GetCommandFullName()
instead.

Discussion

  • miguel sofer

    miguel sofer - 2002-07-18
    • status: open --> closed-fixed
     
  • miguel sofer

    miguel sofer - 2002-07-18

    Logged In: YES
    user_id=148712

    Now calling Tcl_GetCommandFullName() as suggested.