On OSX I can get keypress to collect keystrokes when the slot has the
focus but not when the edit_line had the focus.
For portability you might consider a submit style button.
HTH,
Roy
On Jun 11, 2009, at 2:15 PM, Alexander Rakoczy wrote:
Last I checked (Shoes2), keygrabbing in an edit_line does not work in
Windows or OSX with Shoes.
Has this changed?
Alex
On Thu, Jun 11, 2009 at 08:53, Hugh Sasse<[email protected]> wrote:
Crash for r.1123 as well.
Adding a begin, rescue clause with an alert around the case
statement didn't
help
Hugh
On Thu, 11 Jun 2009, Hugh Sasse wrote:
With and without that correction it crashes on Windows XP for shoes
r.1134. For earlier versions r.811, r.905 I get no entry boxes or
text displayed. The crash is the "Send errors to Microsoft" type of
crash.
The error is triggered by typing 1 into the customer number field.
I can't extract the report that would be sent to microsoft to paste
it here <ctrl-A> won't select the text in it, and it won't respond
to the mouse.
Having the shoes error console up doesn't yield any useful
information. It could be under the other window if the info is
short, but I can't bring ti to the top after the crash. I've
minimized the overlap as best as I can.
I've not tried uncommenting the bits commented out yet.
Hugh
On Thu, 11 Jun 2009, Bradley Grzesiak wrote:
You need to use double quotes to escape \n. Currently, you have
single
quotes.
I hate it when this happens to me.
:brad
On Thu, Jun 11, 2009 at 8:01 AM, dave <[email protected]>
wrote:
Below is the code that will NOT allow a enter key press to be
caught by my
keyboard (at present).
If you uncomment the two lines and remove the ,'\n' from teh
first when
clause i can get the numeric enter key to be caught when pressed.
both key return the value 13 from a test page i got directed to
(I think at
shoes home page (else I've forgot where - know _why was the
author anyway).
Shoes.app do
def what_has_data
if @custno.text.length > 0
alert 'You entered a value into the Customer Number edit line'
else
if @custname.text.length > 0
alert 'You entered a value into the Customer Name edit line'
end
end
end
stack :top =>5, :height => 90 do
title "Find Customer Info", :align => 'center'
end
flow :top => 100, :height => 80 do
para strong "Customer nos"
@custno = edit_line :width => 50
para strong 'customer name'
@custname = edit_line :width => 270
keypress do |key|
case key
when :enter, '\n'
what_has_data
#uncomment the 2 lines below & delete this and the begin - end
pairs
#to get it to work as per my PC
# when "\n"
# what_has_data
end
end
end
end
--
Bradley Grzesiak
[email protected]
http://toleoandbeyond.blogspot.com
* You have received an email from my personal account. Please do
not divulge
this address to any website (eg: evite, shutterfly, etc). I have
another
address for such uses; please ask me for it.
--
alexander rakoczy
http://arakoczy.com