Binding Question...

View: New views
2 Messages — Rating Filter:   Alert me  

Binding Question...

by Jerry LeVan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am running Snow Leopard with Apple's Tcl/Tk...

I am having some problems and am trying some of my
older Tcl/Tk programs...

I have one that sets some bindings on a text widget

*******************
   # Process the whole sql window contents
   bind $ui_vars(code) <$modifier-r> \
       "getStringAndProcess $conn $table 0 ; break"

  # Process the selection or the line containing the insertion point
   bind $ui_vars(code) <Shift_L><Return> \
       "getStringAndProcess $conn $table 1 ; break"

*******************
The $ui_vars(code) is the text widget, $modifier is the
apple command key.

The first binding works ( command-r will cause the whole
window to be processed).

The second binding does *not* fire ie holding down
the shift key and hitting the return simply places
a line break at the insertion point and the
proc "getStringAndProcess" never gets called.

Same code run on my linux box works fine...

What am I doing wrong :(

PS: It has been a long time since I have done any coding
much less tcl....

Jerry




------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: Binding Question...

by Jerry LeVan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmmm,

This seems to work

Replace

  # Process the selection or the line containing the insertion poin
  bind $ui_vars(code) <Shift_L><Return> \
       "getStringAndProcess $conn $table 1 ; break"

By

  # Process the selection or the line containing the insertion poin
  bind $ui_vars(code) <Shift-Return> \
       "getStringAndProcess $conn $table 1 ; break"

Jerry

On Sep 19, 2009, at 1:25 PM, Jerry LeVan wrote:

> Hi,
>
> I am running Snow Leopard with Apple's Tcl/Tk...
>
> I am having some problems and am trying some of my
> older Tcl/Tk programs...
>
> I have one that sets some bindings on a text widget
>
> *******************
>   # Process the whole sql window contents
>   bind $ui_vars(code) <$modifier-r> \
>       "getStringAndProcess $conn $table 0 ; break"
>
>  # Process the selection or the line containing the insertion point
>   bind $ui_vars(code) <Shift_L><Return> \
>       "getStringAndProcess $conn $table 1 ; break"
>
> *******************
> The $ui_vars(code) is the text widget, $modifier is the
> apple command key.
>
> The first binding works ( command-r will cause the whole
> window to be processed).
>
> The second binding does *not* fire ie holding down
> the shift key and hitting the return simply places
> a line break at the insertion point and the
> proc "getStringAndProcess" never gets called.
>
> Same code run on my linux box works fine...
>
> What am I doing wrong :(
>
> PS: It has been a long time since I have done any coding
> much less tcl....
>
> Jerry
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9-12, 2009. Register  
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Tcl-mac mailing list
> tcl-mac@...
> https://lists.sourceforge.net/lists/listinfo/tcl-mac


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac