This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#51 2012-03-18 14:00:08

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

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)


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#52 2012-03-18 14:03:36

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

Change all the places that say MainIde to MainIDE in TextOnlyBlock.


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#53 2012-03-18 14:14:56

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

yes now works


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#54 2012-03-18 14:20:47

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

muppetds wrote:

yes now works

What do you think?
Also play around with the text parameter in the TextOnlyBlock constructor in MainIDE so you can see how it adjusts to the text length.


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#55 2012-03-18 14:23:40

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

Cool

it adjusts fine but the bottom right corner isn't curved like the others (small mistake but still wort mentioning)  tongue

We have to fix the block dragging bug

Last edited by muppetds (2012-03-18 14:24:18)


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#56 2012-03-18 14:28:11

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

muppetds wrote:

Cool

it adjusts fine but the bottom right corner isn't curved like the others (small mistake but still wort mentioning)  tongue

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.  big_smile


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#57 2012-03-18 14:30:05

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

it could be a problem with the mouse/block y codes


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#58 2012-03-18 14:31:55

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

What the rectangle problem?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#59 2012-03-18 14:32:14

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#60 2012-03-18 14:33:15

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

poopo wrote:

What the rectangle problem?

nope the dragging thing error


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#61 2012-03-18 14:38:06

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

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.


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#62 2012-03-18 14:47:51

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

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


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#63 2012-03-18 14:51:27

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

Minor improvements have been made.
This update makes the screen sizing more effective, and slightly improves the dragging.
Rectangle.java

Code:

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)


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#64 2012-03-18 14:59:56

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

yay now works  smile

Im learning of you  now  smile

Last edited by muppetds (2012-03-18 15:00:48)


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#65 2012-03-18 15:04:11

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

muppetds wrote:

yay now works  smile

Im learning of you  now  smile

big_smile  For some reason the blocks dragging space is a bit big.  hmm

What do you mean "Im learning of you  now"?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#66 2012-03-18 15:06:19

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

I mean I'm learning off your code  big_smile


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#67 2012-03-18 15:10:47

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

That's great!  smile
Do you use netbeans?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#68 2012-03-18 15:12:23

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

yes i use it


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#69 2012-03-18 15:13:35

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

use the chat for small messages and use the topic for the code changes?


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#70 2012-03-18 15:59:25

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: scratch in Java-official topic

y u no use sourceforge?
make a git repo and use egit or whatever
a bit easier than browsing through pages to copy paste code lines -.-

Offline

 

#71 2012-03-18 16:27:47

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

it is a very early beta and its not worth it right now


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#72 2012-03-18 18:03:17

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: scratch in Java-official topic

muppetds wrote:

use the chat for small messages and use the topic for the code changes?

Sounds good!
It's like Beta .001 right now. XD


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#73 2012-03-19 02:30:27

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

poopo wrote:

muppetds wrote:

use the chat for small messages and use the topic for the code changes?

Sounds good!
It's like Beta .001 right now. XD

more like a alpha 0.01


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#74 2012-03-19 02:53:19

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: scratch in Java-official topic

roijac wrote:

y u no use sourceforge?
make a git repo and use egit or whatever
a bit easier than browsing through pages to copy paste code lines -.-

Ikr, but use svn :p


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#75 2012-03-19 03:54:38

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: scratch in Java-official topic

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)


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

Board footer