On Fri, Dec 03, 2010 at 09:00:04AM +0100, Alexander Burger wrote:
> Hi Tomas,
> 
> > Why does your code
> > 
> >    (java Label 'addMouseListener
> >       (interface "java.awt.event.MouseListener"
> >          'mouseClicked '((Ev) (setq Dir (if (= 1 Dir) 12 1)))
> >          'mouseEntered nil
> >          'mouseExited nil
> >          'mousePressed nil
> >          'mouseReleased nil ) )
> > 
> > have all those nil cases?  Is that necessary?
> 
> I would prefer if it were not necessary. But an interface like
> MouseListener requires the implementation of all methods. I think I got
> a runtime error if I didn't supply all methods. And I didn't investigate
> how to implement MouseAdapters which are classes and cannot be handled
> by 'interface'.
> 
> Do you have an idea? On the other hand I don't worry too much if I
> simply supply empty methods (this could be encapsulated in a function).
> 


So cool that it works!  I just demoed examples from Rosettacode to a friend
and was delighted that the Swing example just worked...

// Jakob

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to