#2 Mouse move on startup

closed-fixed
None
5
2002-05-23
2001-12-05
No

If the mouse is moved when the main window is being
created, a null pointer exception is thrown.

Recreate by constantly moving the mouse when starting
the application.

StandardDrawingView need the "if" line below added.

public void mouseMoved(MouseEvent e) {
// System.out.println("moved " + myid);
if (tool() != null)
tool().mouseMove(e, e.getX(), e.getY());
}

Kevin

Discussion

  • C. Lamont Gilbert

    Logged In: YES
    user_id=280374

    I agree that work needs to be done.

    In DrawingApplication.open()
    setView(x) is called which creates the view and stuff.

    But this is called about 10-15 lines before toolDOne() and
    the tool does not exist until toolDone() is called. so
    works needs to be done to cleanly clean that up. The
    solution given is not really appropriate.

     
  • Wolfram Kaiser

    Wolfram Kaiser - 2002-05-06

    Logged In: YES
    user_id=146560

    Hello,
    I guess that setTool(new NullTool()) is called to late
    during DrawApplication.open(). As the NullTool should not
    require a drawing view we should call setTool(new
    NullTool()) before creating a drawing view.
    Regards,
    Wolfram

     
  • Wolfram Kaiser

    Wolfram Kaiser - 2002-05-23

    Logged In: YES
    user_id=146560

    Since calling setTool(new NullTool()) sooner I couldn't
    reproduce the null exception pointer exception. I consider
    it as fixed indirectly.

     
  • Wolfram Kaiser

    Wolfram Kaiser - 2002-05-23
    • assigned_to: nobody --> mrfloppy
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks