Thanks Gregg, This is exaclty what I was looking for. I am already custom naming each field so I should be able to use their names to track who has the focus.
Mike >Hi Mike, > >MY> I would like to be able to press the "F4" key to prompt for a field. >MY> Using this code it doesn't work as I would have imagined. > >If I understand you, the goal is to have a hot-key that can pop up a >prompt for any field. If so, you need to do it a different way. e.g. > > view layout [key keycode 'F4 [print "Hello from F4"]] > >The catch is that the general key handler doesn't know which face has >focus, so you need to track or dispatch on that yourself. > > view layout [ > f-1: field "I'm #1!" > f-2: field "I'm #2" > key keycode 'F4 [ > switch system/view/focal-face reduce [ > f-1 [print "field 1 has focus"] > f-2 [print "field 2 has focus"] > ] > ] > ] > >If you just set a custom word for the face and access that for your >prompt info, just keep in mind that system/view/focal-face will be >NONE if no face has focus. > >-- Gregg > >-- >To unsubscribe from the list, just send an email to >lists at rebol.com with unsubscribe as the subject. -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
