Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 Fix class cast exceptions in SwingTerminal

open-fixed
nobody
None
5
2005-10-25
2004-01-03
Anonymous
No

SwingTerminal.keyPressed (line 889) and
SwingTerminal.keyTyped (line 884) try to cast buffer
(an instance of VDUBuffer) to VDUInput, which VDUBuffer
does not implement! There are also multiple tests for
(buffer instanceof VDUInput) littering the file.

I tried to figure out what was intended here, and I
decided that the response to input events should be
external to SwingTerminal. Therefore, I added a
private instance of VDUInput and get/set methods.
SwingTerminal now invokes the appropriate methods of
the VDUInput instance when it receives input events.

Contact Kevin Krumwiede (kjkrum@yahoo.com)

Discussion

  • Logged In: YES
    user_id=48092

    i applied your patch, thanks.

    Ciao, Marcus

     
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=48092

    reopen.

    i do not get any keypresses anymore.

    where is setVDUInput() supposed to be called?

     
    • status: closed-fixed --> open-fixed