Re: Seperate Msg Window
Brent Welch <[email protected]> Fri, 21 Jan 2005 21:31:59 -0800
| Newsgroups | gmane.mail.exmh.devel |
|---|---|
| Message-ID | <[email protected]> |
For the two-sentence lesson in Tk bindings, there is a nice level of indirection that allowed you to fix the problem with one line of code. Windows are associated with a list of "bindtags" Events are bound to "bindtags", not windows. So, Command is a bindtag for all the things like 'n' for Msg_Next, etc. By adding Command to the bindtags set for the Ftoc window, viola, you get the bindings you want. I don't consider that a modularity viloation - bindings are meant to be shared exactly via this mechanism. >>>Chris Garrigues said: > > > From: Chris Garrigues <[email protected]> > > Date: Wed, 19 Jan 2005 15:09:12 -0600 > > > > I think the bindings may have to be completely refactored to fix this > and > > that's a part of tk that I haven't wrapped my head around yet. I'll > think > > about this a little more, but I suspect I'll turn off the separate > message > > window rather than try to fix it. > > Let me change that to "the bindings SHOULD be completely refactored". I > fixed > the bug by adding Command to the bindings for the ftoc in complete > violation > of modularity. It turns out to be exactly the right thing to do, but > the code > is such a mess that it was hard to tell. > > I started to refactor the code, but once I figured out the kludgey > solution was > a one-liner, I changed my mind since I do have more important things to > work > on. > > Chris > > -- > Chris Garrigues Trinsic Solutions > President 1611-B West 6th Street > Austin, TX 78703-5074 > > 512-322-0180 http://www.trinsics.com > > Would you rather proactively pay for > uptime or reactively pay for downtime? > > Trinsic Solutions > Your Proactive IT Management Partner > > -- Brent Welch Software Architect, Panasas Inc Delivering the premier storage system for scalable Linux clusters www.panasas.com [email protected]