Reputation: 31
I want to create a TCL application that receives data over DDE and displays it on a TK Widget. At the moment I' developing the app on a Wish Console. I have an application that will send DDE data to Excel and I 'think' it is sending data to my TCL console (the app doesn't give out an error message) but I can't see the result :-( In TCL stuff I have written in the past I have 'pushed' and 'pulled' data ofer DDE, my app has never been the recipient of a 'push'. What should I be looking for in my console?
TIA mark
Upvotes: 1
Views: 488
Reputation: 137587
The call you are looking for is dde servername
. You use it's -handler
option to install a handler for the service name TclEval
and the topic with the name you choose. The handler takes a single argument.
package require dde
dde servername -handler MyDdeHandler "MySampleTopic"
proc MyDdeHandler {request} {
puts "The request was '$request'"
return "this is an example response"
}
Note that the other side still has to talk to the correct service/topic.
Useful links:
Upvotes: 1