in reply to tk bindings and readonly?

The bindRdOnly subroutine is not doing what you think it's doing. This subroutine is called during class initialization to setup default bindings, not to introduce new ones.

You can try the following instead -
$t->bind('Tk::Text', '<Control-s>', \&save_file);

Replies are listed 'Best First'.
Re: Re: tk bindings and readonly?
by Elijah (Hermit) on Dec 10, 2003 at 23:03 UTC
    That worked great! thank you. It seems it is always the small things that are getting me these days.
Re: Re: tk bindings and readonly?
by JamesNC (Chaplain) on Dec 11, 2003 at 12:59 UTC
    Just a note: converters method of doing this binding is specific to just that widget, while Rogers method can be used if one wants to affect that binding on ALL Tk::Text widgets. I think it is an important difference, ie, if you had 2 Text Widgets and only wanted that key binding on a specific widget in your main window... you should use converters. ++ to both of you though