After all the discussion on this matter I see that i have a problem.
being how to capture user interaction via the keyboard and allowing the user 
to not be forced to use the mouse.

I have it solved for Linux (well at least on mine with my keyboard) but at 
work i had a few minutes and ran my code on that winXP pro box - total failure 
as mentioned in my last message.

So how has other folk dealt with this issue? and do they know if it's platform 
independent?

also lastly would using a URL styled approach work with the keyboard?

Dave.

On Wed, 10 Jun 2009 21:11:00 dave wrote:
> I have a shoes program (below this message) where what i want to do is to
> allow the user to enter data into 1 of 2 edit_lines.
>
> From the user pressing enter i then check which edit_line has something in
> it and setup parameters for a SQL statement that 's in a class called dbase
> that's inside a module called sqlite3_calls.
>
> this tho is of no importance yet as i cannot capture the enter key!
>
>       Note I'm only wanting to get 1 of the two edit_lines working then get 
> the
>       other done once i working based on the solution for the 1st one.
>
> Currently what happens is that the program runs but when I alt+/ to see the
> debug window after my shoes screen appears i see a comment saying  pressed
> enter! when in fact i haven't press a dam thing except .
>
> did a search on keypress and edit_line and keypress but nothing i saw
> really gave me any hints.
>
> Dave.
>
> code as it stands is below.....
>
> require "sqlite3_calls.rb"
>
> Shoes.app do
> #  extend Dbase  #for the purposes isolation I've commented out this line
>
>   stack :top =>5, :height => 90 do
>     title "Find Customer Info", :align => 'center'
>   end
>
>   flow :top => 100, height => 70 do
>     para strong "Customer nos"
>     @custno = edit_line :width => 50 :focus
>
>     para strong 'customer name'
>     @custname = edit_line :width => 270
>   end
>   if keypress = :enter or keypress = "\n"
>     debug 'pressed enter !'
>     if @custno != nil
>       para 'cust number has a value !'
>    #   rows = rec_to_find('customers', 'cust_nos', @custno)   # please
> ignore else
>       if @custname != nil
>         para 'cust name has a value !'
>
>       end
>
>     end
>   end
>
>
>   flow :top => 550 do
>     para strong 'data return shown here!'
>   end
>
> end

Reply via email to