From: Jeff H. <jeffh@ActiveState.com> - 2006-01-03 15:54:23
|
Bryan Oakley wrote: > Now that you've got me thinking about it, I can just use [winfo > pointerxy .]. > > I'm a tiny bit worried about performance since I'll be doing this for > every mouse click, but for the time being this is just for my personal > use so I'm not going to worry too much about it. A quick test shows it's > costing me only 40usec/click which is hardly anything to worry about > anyway. I'm coming a bit late into this conversation (just getting back from vacation), but if you are doing this on mouse clicks, why not just use the binding mechanism already in Tk? You can use that from C as well. [winfo pointerxy] isjust %X and %Y. > With tools like tcl/tk, critcl and ffidl, I wonder why anyone would ever > choose to code their main application logic in C these days. Indeed. ffidl is fickle though - very easy to blow up in your face. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |