Ah. Good. You're very welcome. Thanks for using Pivot.  

~Roger Whitcomb


On Jul 17, 2013, at 5:55 PM, Erik Innocent <[email protected]> wrote:

> Ohhhhh, so I need to add the interface UnprocessedKeyHandler to my class that 
> implements Application, and then of course implement the interface's methods. 
> So simple... I don't know why that didn't click for me from the Javadoc. Your 
> answer -- '“Application” object that implements this interface' -- is what 
> gave me the eureka moment.
> 
> Thanks for your help and your prompt reply, I genuinely appreciate it!
> --E
> 
> 
> 
> On Wed, Jul 17, 2013 at 5:52 PM, Roger L. Whitcomb 
> <[email protected]> wrote:
>> So, according to the Javadoc for the Application. UnprocessedKeyHandler 
>> interface:
>> 
>>  
>> 
>> Optional interface that allows an application to handle unprocessed
>> 
>> key events (keystrokes that are processed when no component has the
>> 
>> input focus).
>> 
>>  
>> 
>> This would be the case (for instance), if you have an empty window, or a 
>> form that has all its fields disabled.  The kind of things you would 
>> probably want to handle in here would be a keystroke to exit the 
>> application, or to invoke Help, or an About box.  Or maybe a “Connect” 
>> function – something that the user would want to do when nothing else was 
>> available.
>> 
>>  
>> 
>> The code in ApplicationContext that handles key events will drop into 
>> looking for an “Application” object that implements this interface when 
>> nothing else claims the keystroke.
>> 
>>  
>> 
>> HTH,
>> 
>> ~Roger Whitcomb
>> 
>>  
>> 
>> From: Erik Innocent [mailto:[email protected]] 
>> Sent: Wednesday, July 17, 2013 3:22 PM
>> To: [email protected]
>> Subject: What is an example of the use of Application.UnprocessedKeyHandler 
>> in Apache Pivot?
>> 
>>  
>> 
>> What is an example of the use of `Application.UnprocessedKeyHandler` in 
>> Apache Pivot? I've checked Google and the Pivot docs and see no examples, 
>> and the Javadoc isn't enlightening. There's a tease of sample code in the 
>> mailing list archives at:
>> 
>>  
>> 
>> http://apache-pivot-users.399431.n3.nabble.com/KeyListeners-on-ImageView-td2600622.html
>> 
>>  
>> 
>> But the code attachment is not available. Note that I asked this question 
>> yesterday at:
>> 
>>  
>> 
>> http://stackoverflow.com/questions/17690503/what-is-an-example-of-the-use-of-application-unprocessedkeyhandler-in-apache-piv
>> 
>>  
>> 
>> Feel free to answer it there if you want to get the points for it =) 
>> Otherwise I'll post the answer there and cite the source here.
>> 
>>  
>> 
>> Thanks!
>> 
>> --Erik Innocent
>> 
> 

Reply via email to