its running but i can't drag it at all:
debug says: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: variable MainIde
location: class TextOnlyBlock
at TextOnlyBlock.blockClicked(TextOnlyBlock.java:28)
at MainIDE.UpdateBlock(MainIDE.java:62)
at MainIDE.paint(MainIDE.java:55)
at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:812)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1672)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Last edited by muppetds (2012-03-18 14:00:59)
Offline
Cool
it adjusts fine but the bottom right corner isn't curved like the others (small mistake but still wort mentioning)
We have to fix the block dragging bug
Last edited by muppetds (2012-03-18 14:24:18)
Offline
muppetds wrote:
Cool
it adjusts fine but the bottom right corner isn't curved like the others (small mistake but still wort mentioning)
We have to fix the block dragging bug
the corner thing is a problem with the roundedrectangle class unfortunatly so there is nothing we can do about it.
I'll fix it with my rectangle collision code.
Offline
poopo wrote:
muppetds wrote:
poopo wrote:
What the rectangle problem?
nope the dragging thing error
It would be an error with the block position if anything. I'm running some tests.
oh right
Offline
Minor improvements have been made.
This update makes the screen sizing more effective, and slightly improves the dragging.
Rectangle.java
public class Rectangle { int width; int height; int x; int y; public Rectangle(int width, int height, int x, int y) { this.width = width; this.height = height; this.x = x; this.y = y; } public boolean Intersects(Rectangle rect) { return !(x + width < rect.x || x > rect.x + rect.width || y + height < rect.y || y > rect.x + rect.height); } }
replace the line jf.setSize(ssX,ssY); in MainIDE with jf.setExtendedState(Frame.MAXIMIZED_BOTH);
replace the line right after if(mouseDown ) in TextOnlyBlock with if(((new Rectangle(0,0,mouseX, mouseY).Intersects(new Rectangle(blockLength, 25, blockX, blockY))) || mouseDownLastTime)
& (!MainIDE.beingDragged || mouseDraggingLastTime)){
Last edited by poopo (2012-03-18 14:51:50)
Offline
sighs ok ill set up a source forge account with all the code files
done https://sourceforge.net/projects/sratchjava/files/
Download the scratch java.zip for all the files - netbeans project
EDIT: sry scratch team for calling scratch Java - Its just until we think of a name for it
Last edited by muppetds (2012-03-19 03:57:16)
Offline