Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B bjgf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 127
    • Issues 127
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • BlueJ
  • bjgf
  • Issues
  • #2147
Closed
Open
Issue created Nov 20, 2018 by Davin McCall@davmacMaintainer

[GREENFOOT-820] Click from actor placement is remembered during first act cycle

Reported by Thomas Karp on Blueroom: {quote}there seem to be a bug when using Greenfoot.mouseClicked(…). A very short example is:   {code} public class Fish extends Actor { public void act()     { if(Greenfoot.mouseClicked(this)) javax.swing.JOptionPane.showMessageDialog(null, "Hallo"); } } {code}

When I create a fish by right-clicking its class and then run the scenario, “Hallo” appears (most of the time). The click to create the fish seem to be stored. Then everything works like it should. When I create a fish in the world, then run the scenario, everything is fine. But when I create it in the world, after that I click the fish, and than click “Run”, the click event fires again. So it seems to be stored in this case again.

I think a click-event should only be handled after the Run-button is clicked. {quote}


Issue metadata

  • Issue type: Bug
  • Priority: Medium
  • Fix versions: 3.5.3
Assignee
Assign to
Time tracking