bjgf issueshttps://gitlab.bluej.org/bluej/bjgf/-/issues2015-11-21T16:40:47Zhttps://gitlab.bluej.org/bluej/bjgf/-/issues/1421[GREENFOOT-77] calling 'delay' should repaint world2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-77] calling 'delay' should repaint worldThis used to be the behaviour until version 1.2.0 (I think) but it does not do this anymore.
If it doesn't interfere with other stuff, it would be nice to do this again
---
**Issue metadata**
- Issue type: Task
- Priority: Low
- Fix ...This used to be the behaviour until version 1.2.0 (I think) but it does not do this anymore.
If it doesn't interfere with other stuff, it would be nice to do this again
---
**Issue metadata**
- Issue type: Task
- Priority: Low
- Fix versions: 1.3.0Michael KöllingMichael Köllinghttps://gitlab.bluej.org/bluej/bjgf/-/issues/1420[GREENFOOT-76] Compiling empty project causes the compile button to be greyed...2015-11-21T16:40:47ZNeil Brown[GREENFOOT-76] Compiling empty project causes the compile button to be greyed outIf compiling a new project that doesn't contain any classes, the "Compile all" will stay greyed out and it can't be used anymore.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0If compiling a new project that doesn't contain any classes, the "Compile all" will stay greyed out and it can't be used anymore.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1419[GREENFOOT-75] Greenfoot.delay not working on Linux2015-11-21T16:40:47ZNeil Brown[GREENFOOT-75] Greenfoot.delay not working on LinuxUsing Greenfoot.delay on my Linux system causes problems with the update of the UI. Even though repaint requests are issued, the WorldCanvas never updates the graphics. Neither is the rest of the Greenfoot UI. Looks like the Swing event ...Using Greenfoot.delay on my Linux system causes problems with the update of the UI. Even though repaint requests are issued, the WorldCanvas never updates the graphics. Neither is the rest of the Greenfoot UI. Looks like the Swing event thread never gets a chance to run.
Works fine on Mac OS. Haven't tried it on Windows yet.
When using the Greenfoot.delay method, the Simulation will never do any delays itself because too much time has already passed. Inserting a Thread.yeild() after every simulation cycle seems to fix it, but this will possibly slow down the animation speed on other systems. Maybe another solution should be found.
Should also be tested on different Linux systems.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1418[GREENFOOT-74] 'Preferences' dialogue is not accessible2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-74] 'Preferences' dialogue is not accessibleCurrently, you can open the preferences via the editor, but not via the main menu.
The preferences should be adapted from BlueJ for Greenfoot, and be made accessible
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix vers...Currently, you can open the preferences via the editor, but not via the main menu.
The preferences should be adapted from BlueJ for Greenfoot, and be made accessible
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 2.0Neil BrownNeil Brownhttps://gitlab.bluej.org/bluej/bjgf/-/issues/1417[GREENFOOT-73] 'Save As' function needed2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-73] 'Save As' function neededThis is urgently needed to make backups before making changes
---
**Issue metadata**
- Issue type: Task
- Priority: Medium
- Fix versions: 1.3.0This is urgently needed to make backups before making changes
---
**Issue metadata**
- Issue type: Task
- Priority: Medium
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1416[GREENFOOT-72] World and Actor should not be editable2015-11-21T16:40:47ZNeil Brown[GREENFOOT-72] World and Actor should not be editableIf the World or Actor class is opened in the editor in the implementation view, it is possible to edit the source. This should not be allowed, since Greenfoot will not use the modified classes anyway when executing.
In fact, the impleme...If the World or Actor class is opened in the editor in the implementation view, it is possible to edit the source. This should not be allowed, since Greenfoot will not use the modified classes anyway when executing.
In fact, the implementation view for World and Actor should be disabled all together.
---
**Issue metadata**
- Issue type: Bug
- Priority: Medium
- Fix versions: 1.4.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1415[GREENFOOT-71] World.getObject(class) spec and implementation can be improved2015-11-21T16:40:47ZDavin McCall[GREENFOOT-71] World.getObject(class) spec and implementation can be improvedIn World, we have:
public synchronized List getObjects(Class cls)
With comment:
* Get all the objects in the world.<br>
*
* If iterating through these objects, you should synchronize on this world
* to avoid Concur...In World, we have:
public synchronized List getObjects(Class cls)
With comment:
* Get all the objects in the world.<br>
*
* If iterating through these objects, you should synchronize on this world
* to avoid ConcurrentModificationException.
* <p>
*
* The objects are returned in their paint order. The first object in the
* List is the one painted first. The last object is the one painted on top
* of all other objects.
* <p>
The implementation:
public synchronized List getObjects(Class cls)
\{
return Collections.unmodifiableList(collisionChecker.getObjects(cls));
}
Firstly, the requirement to synchronize on the world when iterating through the list seems to be an undesirable requirement (force users to use synchronization). It's unnecessary anyway when a) using the IBSP collision checker, which is now the default and b) when the cls parameter is non-null, regardless of collision checker (because that implies the returned list must be a new list).
Secondly, the statement that objects are returning in their paint order isn't true (for the IBSP collision checker. This was an oversight...).
Thirdly, there's no need to involve the collision checker in the implementation of this method at all. All that's needed is to iterate over the list of objects in the world and filter according to the cls parameter. I propose doing this, and always returning a new list regardless of whether cls is null (thereby removing the requirement for synchronization).
Davin
\---\-
My opinion is that it all sounds good.
For the second issue, I don't think we should promise anything about the order in which objects are returned. Maybe we should add a comment at the top of Actor and World that users should not rely on the order of lists of objects returned from the collision methods, unless the javadoc for the methods explicitly says so?
Poul
\---\-
I agree with some points.
\\- requiring synchronisation is unfortunate, and should be removed if we can do it without losing too much else
\\- maintaining paint order is not terribly important \\- that constraint could be removed
The decision to return the original list seems to be a performance improvement detail. Copying the whole list could be expensive. Especially when it is used for checking whether any objects remain. If you want to stop when all objects are gone, you would now write
bq. if (getWorld().getObjects(null).size() == 0) \{
Greenfoot.stopSimulation();
}
This is quite a common idiom, since we have no numberOfObjects() in the world.
(Admittedly, this is more often used, I think, with a specific class of objects:
bq. if (getWorld().getObjects(\!ZargonianButterNuts.class).size() == 0) \{
Greenfoot.stopSimulation();
}
In that case, we make a copy anyway... and the whole argument does not count.)
Alternatively, we could have returned an interator rather than a list \-\- then we would never need to make a copy of he list. Just implement an iterator that skips some objects... Hmmm, might have been better.
How about we always copy the list, and add a method to check for object count?
Michael
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0Davin McCallDavin McCallhttps://gitlab.bluej.org/bluej/bjgf/-/issues/1414[GREENFOOT-70] Exceptions in world constructor is not handled well2015-11-21T16:40:47ZNeil Brown[GREENFOOT-70] Exceptions in world constructor is not handled wellIf there is an exception in the constructor of a World-subclass, Greenfoot doesn't behave correctly.
For instance, if using the Compile All button to compile, and it fails when instantiating the new world, the Compile All button will sta...If there is an exception in the constructor of a World-subclass, Greenfoot doesn't behave correctly.
For instance, if using the Compile All button to compile, and it fails when instantiating the new world, the Compile All button will stay greyed out.
Failing to instantiate a new world should be handled better.
---
**Issue metadata**
- Issue type: Bug
- Priority: Medium
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1413[GREENFOOT-69] Documentation always opens Java API 1.4.22015-11-21T16:40:47ZMichael Kölling[GREENFOOT-69] Documentation always opens Java API 1.4.2When you call 'Java Class Documentation' from 'Help' it always opens Java API
1.4.2, even if you change in 'BlueJ: preferences' to open an API from a
different url.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versio...When you call 'Java Class Documentation' from 'Help' it always opens Java API
1.4.2, even if you change in 'BlueJ: preferences' to open an API from a
different url.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.5.0Michael KöllingMichael Köllinghttps://gitlab.bluej.org/bluej/bjgf/-/issues/1412[GREENFOOT-68] delay method should have a parameter2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-68] delay method should have a parameterGreenfoot.delay()
should really be
Greenfoot.delay(int time)
Currently, delay is relative to speed. That's good. 'time' should be a
multiplier of that (so that delay(1) is equivalent to the current sematics).
---
**Issue metadata**
-...Greenfoot.delay()
should really be
Greenfoot.delay(int time)
Currently, delay is relative to speed. That's good. 'time' should be a
multiplier of that (so that delay(1) is equivalent to the current sematics).
---
**Issue metadata**
- Issue type: Task
- Priority: Low
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1411[GREENFOOT-67] Reconsider which scenarios to include in greenfoot distribution2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-67] Reconsider which scenarios to include in greenfoot distributionWe should think about what scenarios we want to include in the greenfoot
distribution. The ones that are there now, are mostly there because they were
the first scenarios we developed.
We should select scenarios that are different and d...We should think about what scenarios we want to include in the greenfoot
distribution. The ones that are there now, are mostly there because they were
the first scenarios we developed.
We should select scenarios that are different and demonstrates different
Greenfoot features. Also, the scenarios included should be cleaned up and well
documented since they will serve as example scenarios for many people.
---
**Issue metadata**
- Issue type: Task
- Priority: Medium
- Fix versions: 1.4.1https://gitlab.bluej.org/bluej/bjgf/-/issues/1410[GREENFOOT-66] Progress indicator needed for export2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-66] Progress indicator needed for exportExport can take a rather long time. There should be a progress (or busy)
indicator somewhere.
Maybe a non-modal dialogue with a twiddling (indefinite) progress bar, that has
buttons "Open Web Page" and "Close" ("Open Web Page" is initia...Export can take a rather long time. There should be a progress (or busy)
indicator somewhere.
Maybe a non-modal dialogue with a twiddling (indefinite) progress bar, that has
buttons "Open Web Page" and "Close" ("Open Web Page" is initially disabled, and
enables when finished).
---
**Issue metadata**
- Issue type: Task
- Priority: Medium
- Fix versions: 1.4.6https://gitlab.bluej.org/bluej/bjgf/-/issues/1409[GREENFOOT-65] Application name should be something sensible for stand-alone ...2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-65] Application name should be something sensible for stand-alone executionThe application name shown in the menu bar on the Mac shows the qualified class
name. Instead, it should show either the scenario name, or the string
"Greenfoot VM".
---
**Issue metadata**
- Issue type: Task
- Priority: Low
- Fix vers...The application name shown in the menu bar on the Mac shows the qualified class
name. Instead, it should show either the scenario name, or the string
"Greenfoot VM".
---
**Issue metadata**
- Issue type: Task
- Priority: Low
- Fix versions: 2.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1408[GREENFOOT-64] Out of Memory Error with certain sound use2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-64] Out of Memory Error with certain sound useIf I repeatedly play sound effects, Greenfoot throws several out of memory
errors.
\------\- Comment GREENFOOT-1 From Poul Henriksen 2007-03-25 17:41:47 [reply] \------\-
On mac, there also seems to be problems with freeing memory used...If I repeatedly play sound effects, Greenfoot throws several out of memory
errors.
\------\- Comment GREENFOOT-1 From Poul Henriksen 2007-03-25 17:41:47 [reply] \------\-
On mac, there also seems to be problems with freeing memory used for sounds.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.4.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1407[GREENFOOT-63] Pause-button doesn't work in applets running in firefox2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-63] Pause-button doesn't work in applets running in firefoxAfter starting a greenfoot applet in firefox the pause-button can't be clicked
with the mouse. Moving a greenfoot object in the world with the mouse, turns
the pause button into the run button.
Using the keyboard (tab+enter) can be use...After starting a greenfoot applet in firefox the pause-button can't be clicked
with the mouse. Moving a greenfoot object in the world with the mouse, turns
the pause button into the run button.
Using the keyboard (tab+enter) can be used to activate the pause button.
It works in Safari and the appletviewer. Works fine on linux too.
Strange...
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.4.5https://gitlab.bluej.org/bluej/bjgf/-/issues/1406[GREENFOOT-62] Add code pad functionality2015-11-21T16:40:47ZMichael Kölling[GREENFOOT-62] Add code pad functionalityA user requested this. I like the idea, but not sure where it would fit in the
UI. Maybe next to the control panel.
Buis, Paul E. wrote:
> Greenfoot is really cool\! However, I was looking for a feature that I
> recall seeing with Blue...A user requested this. I like the idea, but not sure where it would fit in the
UI. Maybe next to the control panel.
Buis, Paul E. wrote:
> Greenfoot is really cool\! However, I was looking for a feature that I
> recall seeing with BlueJ that is missing here. I'd love to be able to
> interactively have expressions evaluated so I can do things like:
>
>
>
> wombatList = getWorldObjects(Wombat.class);
>
> wombat0 = wombatList.get(0);
>
> wombat0.move();
>
>
>
> interactively rather than going through the process of compiling and
> reinitializing the world.
\-\-
I am not so sure about this one. Needs discussion. \-mik\-
---
**Issue metadata**
- Issue type: Task
- Priority: Medium
- Fix versions: 3.0.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1405[GREENFOOT-61] Two projects with the same name - button disable problems2015-11-21T16:40:46ZMichael Kölling[GREENFOOT-61] Two projects with the same name - button disable problemsWhen two projects with the same name are open at the same time, and one of them then closed, the compile all button in the other scenario gets disabled.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.4.5When two projects with the same name are open at the same time, and one of them then closed, the compile all button in the other scenario gets disabled.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.4.5https://gitlab.bluej.org/bluej/bjgf/-/issues/1404[GREENFOOT-60] Numeric keypad does not work, and related key problems2015-11-21T16:40:46ZMichael Kölling[GREENFOOT-60] Numeric keypad does not work, and related key problemsTo check whether the a-key is down you have to write Greenfoot.isKeyDown("A");
Also, the numbers entered via the keypad doesn't work.
\---\-
Comment 1 From Davin McCall 2007-03-19 04:51:08
What is the desired behavior for the number p...To check whether the a-key is down you have to write Greenfoot.isKeyDown("A");
Also, the numbers entered via the keypad doesn't work.
\---\-
Comment 1 From Davin McCall 2007-03-19 04:51:08
What is the desired behavior for the number pad keys? Do they act as numbers or
arrows, or should they be entirely different key names (eg "np8", "np3" ...)?
It would be nice if we could make them act as cursor keys if numlock is off, or
arrows if it is on, but there doesn't seem to be any way to get the status of
numlock.
\---\-
Comment 2 From Poul Henriksen 2007-03-20 09:15:55
Subject: Re: isKeyDown only works with upper case characters, and
does not work with numeric keypad
If there is no way to get the numlock status, the number pad should just
map to the numbers.
\---\-
Comment 3 From Davin McCall 2007-03-21 03:51:31
Hmm, it turns out we can get numlock status via
Toolkit.getDefaultToolkit().getLockingKeyState()... except on linux, it throws
UnsupportedOperationException.
I've tried to fix this so that it translates according to numlock status
(except on linux, it always assumes numlock is ON) but I've no idea how
portable this is across operating systems and keyboard layouts etc. I really
wonder if it might have been better to have different names for the keypad
keys.
(It seems on linux, keypad 7/9/1/3 are automatically mapped to the correct key,
but 8/4/6/2 are mapped to VK_KP_UP/LEFT/RIGHT/DOWN; VK_NUMPAD_x keys aren't
used at all).
Let's see if this works on Mac/Windows...
\---\-
Comment 4 From Poul Henriksen 2007-03-21 15:40:37
Subject: Re: isKeyDown only works with upper case characters, and
does not work with numeric keypad
I get the UnsupportedOperationException on the Mac too. I think we
should just map it directly to the numbers. If people want to use the
keypad as arrows, they just have to program it to use the numbers.
---
**Issue metadata**
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.0.0Davin McCallDavin McCallhttps://gitlab.bluej.org/bluej/bjgf/-/issues/1403[GREENFOOT-59] Class menu shows protected and package private constructors2015-11-21T16:40:46ZMichael Kölling[GREENFOOT-59] Class menu shows protected and package private constructorsThe class pop-up menu should only show public constructors and public static
methods. Currently package private and protected methods are also shown.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0The class pop-up menu should only show public constructors and public static
methods. Currently package private and protected methods are also shown.
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 1.3.0https://gitlab.bluej.org/bluej/bjgf/-/issues/1402[GREENFOOT-58] Can't quick add (shift click) an object without a default cons...2015-11-21T16:40:46ZMichael Kölling[GREENFOOT-58] Can't quick add (shift click) an object without a default constructorShould be handled in a better way \\- probably by not creating any drag-image if
constructor does not exist.
When shift-click-placing an object that has no default constructor:
java.lang.NoSuchMethodException: Paint.<init>()
at jav...Should be handled in a better way \\- probably by not creating any drag-image if
constructor does not exist.
When shift-click-placing an object that has no default constructor:
java.lang.NoSuchMethodException: Paint.<init>()
at java.lang.Class.getConstructor0(Class.java:2647)
at java.lang.Class.getConstructor(Class.java:1629)
at greenfoot.gui.classbrowser.ClassView.createInstance (ClassView.java:457)
at greenfoot.gui.classbrowser.role.GreenfootClassRole
$1.actionPerformed(GreenfootClassRole.java:134)
...
---
**Issue metadata**
- Issue type: Bug
- Priority: Low
- Fix versions: 2.0Neil BrownNeil Brown