TIP #130: UNIQUE DDE SERVER NAMES. ==================================== Version: $Revision: 1.4 $ Author: Pat Thoyts State: Final Type: Project Tcl-Version: 8.5 Vote: Done Created: Sunday, 23 March 2003 URL: https://tip.tcl-lang.org130.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== The /dde/ package server registration code should ensure that the server names are unique. The proposed changes will mean end-user visible changes for some scripts. RATIONALE =========== This TIP is really driven by Bug 219293 [] The DDE system actually identifies servers by combination of window ID and a service and topic string identifier. There is nothing to prevent multiple servers having the same string identifiers but it is then a problem to determine which server you need to communicate with. The /tk appname/ command handles a similar situation by making the name unique during registration by appending a numerical suffix to the suggested name and then returning the name registered as the result of the command. PROPOSED CHANGES ================== This TIP proposes to use the /tk appname/ unique name algorithm within the DDE server-name registration code. This TIP also proposes a /-force/ option to this command to force the suggested name to be registered. The /-force/ option would then provide the current registration scheme. REFERENCE IMPLEMENTATION ========================== See the patch attached to SF patch 690354 [] CONSEQUENCES ============== Firstly the /dde servername/ command may register a different name than that provided to the command. Scripts will need to check the name actually registered by either maintaining the result of this command, or by executing the /dde servername/ command without any arguments. This may impact scripts that assume the supplied argument was in fact the name registered. Secondly, the name registration code must obtain a list of the dde server names currently registered on the system. It can do this by effectively calling /dde services TclEval/. In previous versions of the /dde/ package there is a potential for the /dde services/ command to hang in the presence of applications that are not processing messages. However, this issue has been addressed by Bug 707822's resolution. COPYRIGHT =========== This document is hereby placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows