I'm exercising aliases between master and slave interps. The following
gave an unexpected result, or I misunderstood something.
The unexpected part is that [slave alias srcCmd {}] should delete a
previously defined alias. What I find is that it deletes the command
itself in the slave interpreter. See below for a reproducible script.
Did I misunderstand the meaning of an alias, or is this a bug?
Greetings,
Erik Leunissen
==============
% interp create slave
slave
% proc putsFromMaster {txt} {
puts "Master: $txt"
}
% slave alias puts putsFromMaster
puts
% slave eval puts foo
Master: foo
% puts [slave eval info commands p*]
pwd pid proc package puts
% slave alias puts {}
% slave eval puts foo
invalid command name "puts"
% puts [slave eval info commands p*]
pwd pid proc package
--
leunissen@ nl | Merge the left part of these two lines into one,
e. hccnet. | respecting a character's position in a line.
I've been using Tcl.8.4.9
Erik
I think the original command in the slave was deleted during
its "replacement" by the alias, not during deletion of the alias.
... and you are right.
Thanks,
Erik