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

#51 2012-04-21 12:11:47

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

I fixed it now, I think.

Offline

 

#52 2012-04-21 12:14:02

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

dreamod wrote:


Ok.
1st error: The Variable AdvancedMode is nil, which is not a boolean.Typing

Code:

Smalltalk at: #AdvancedMode put: false.

should solve the first problem. Since there are two modes, I use a boolean variable, true is advanced and false is not so advanced. The Create A Block Dialog is also very different in advanced mode so I use the AdvancedMode variable while initializing the dialog.

2nd Error: I forgot to file-out the method #saveNewBlock: when I made the patch. It was placed under 'accessing' instead of 'blocks'.

3rd Error: The 're-initializing custom block specs' block is supposed to be there when your re-initializing the custom block specs (basically, removing everything and starting fresh).

Thank you for reporting the bugs. I have updated the project, with bugs fixed in the patch.

1st Error: Fixed.
2nd Error:  I re-filed in the patch in the first post, but the problem wasn't fixed.
3rd Error: But there's two of them...?

Another question:  What filetype are block files?
And another  tongue   Can args be created in a block file are do they need to be in seperate files?

New error:  selecting "Support" from the Blocks menu results in "Message not understood: parse:".

1:  smile
2: The patch in the first post is SERIOUSLY outdated. Do you mean the one on the project?
3: Does that really matter?

Q And A

Q: "What filetype are block files?"
A: Block file types are plain text files that get filed-in to the system, when imported.

Q: "Can args be created in a block file or do they need to be in seperate files?"
A: Short Answer: No.
    Long Answer: Yes, When you create a block and an arg, you can open them with TextEdit (or Microsoft Word) and add the arg contents into the block file and save it.

Hmmm... The last error, is another thing I forgot to file-out. I used panther's FormatCodeParser, which allows different fonts and links. I forgot to file-out that.

2.  Alright, getting a new patch installed.
3.  I'm still not sure why they're there, especially since they show up on Scratch startup.
Q1.  So .txt works?
Q2.  I'm not quite sure I understand...

Offline

 

#53 2012-04-21 12:17:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

The "Support" option now produces the error "key not found".

I have a .txt file on my desktop that the Block Importer won't recognize.

Last edited by Greenatic (2012-04-21 12:24:33)

Offline

 

#54 2012-04-21 12:41:31

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

The "Support" option now produces the error "key not found".

I have a .txt file on my desktop that the Block Importer won't recognize.

sad
ok...

1: Support: - I'm actually a little tired now, I'll fix it tomorrow or some time soon.
2: Change the extension to '.block'

Offline

 

#55 2012-04-21 12:43:29

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

The "Support" option now produces the error "key not found".

I have a .txt file on my desktop that the Block Importer won't recognize.

sad
ok...

1: Support: - I'm actually a little tired now, I'll fix it tomorrow or some time soon.
2: Change the extension to '.block'

The block file is still not showing up...

Offline

 

#56 2012-04-21 13:28:32

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

dreamod wrote:

Greenatic wrote:

The "Support" option now produces the error "key not found".

I have a .txt file on my desktop that the Block Importer won't recognize.

sad
ok...

1: Support: - I'm actually a little tired now, I'll fix it tomorrow or some time soon.
2: Change the extension to '.block'

The block file is still not showing up...

Did you type it yourself?

Offline

 

#57 2012-04-21 13:31:58

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

dreamod wrote:


sad
ok...

1: Support: - I'm actually a little tired now, I'll fix it tomorrow or some time soon.
2: Change the extension to '.block'

The block file is still not showing up...

Did you type it yourself?

It's the example file you gave in the second(?) post.  The move %n steps toward %m.

Offline

 

#58 2012-04-21 13:36:34

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Block Files

Do you guys mind implementing this into my mod, Pixelate, when you two get finished?


Get ready for domination of:  tongue

Offline

 

#59 2012-04-21 13:40:32

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

coolhogs wrote:

Do you guys mind implementing this into my mod, Pixelate, when you two get finished?

Actually, this is my project, Greenatic is just supporting it. (thanks Greenatic).
Sure, give me a download link to your mod. This project is pretty much finished, I'm just going to fix the last bugs.

Offline

 

#60 2012-04-21 13:43:49

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

dreamod wrote:

Greenatic wrote:

The block file is still not showing up...

Did you type it yourself?

It's the example file you gave in the second(?) post.  The move %n steps toward %m.

oh no... OK! Remember this everybody, All the patches, and block files here are OUTDATED! Not your fault, Greenatic. You have to export and import block files. That block file is old, and it is a '.txt', isn't it? Well, try creating a block and exporting and then importing it.

Offline

 

#61 2012-04-21 13:50:02

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Block Files

dreamod wrote:

coolhogs wrote:

Do you guys mind implementing this into my mod, Pixelate, when you two get finished?

Actually, this is my project, Greenatic is just supporting it. (thanks Greenatic).
Sure, give me a download link to your mod. This project is pretty much finished, I'm just going to fix the last bugs.

Well it's not quite done yet...


Get ready for domination of:  tongue

Offline

 

#62 2012-04-21 14:00:05

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

More debugging!   big_smile

Creating a block now returns the error: "Message not understood: extraCodes".

Offline

 

#63 2012-04-21 15:26:51

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

More debugging!   big_smile

Creating a block now returns the error: "Message not understood: extraCodes".

WOW I had no idea this had so many bugs. I am so glad you're helping me find bugs. I'm going to add your name to the support, saying 'beta tester: Greenatic' if that's ok.

Offline

 

#64 2012-04-21 15:27:55

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

More debugging!   big_smile

Creating a block now returns the error: "Message not understood: extraCodes".

WOW I had no idea this had so many bugs. I am so glad you're helping me find bugs. I'm going to add your name to the support, saying 'beta tester: Greenatic' if that's ok.

That's fine  smile   I love debugging other people's programs for some bizarre reason.   tongue

Let me know when there's an update.  And for the final release, should we make it so you can update from a pre-set URL?  It should just be a matter of filing-out changes, uploading, and downloading like a block download...

The error message mentioned in the quote is because there is no extraCodes method in CommandBlockMorph.  That should be easy enough to fix.

Last edited by Greenatic (2012-04-21 15:34:01)

Offline

 

#65 2012-04-21 15:32:29

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Block Files

Is it sad that since I got the moderator tools I can't work out how to delete me posts anymore? I moved the original post text down a bit since I think what I said was missed.

Last edited by sparks (2012-04-21 15:39:50)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#66 2012-04-21 15:33:25

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

dreamod wrote:

Greenatic wrote:

More debugging!   big_smile

Creating a block now returns the error: "Message not understood: extraCodes".

WOW I had no idea this had so many bugs. I am so glad you're helping me find bugs. I'm going to add your name to the support, saying 'beta tester: Greenatic' if that's ok.

That's fine  smile   I love debugging other people's programs for some bizarre reason.   tongue

Let me know when there's an update.  And for the final release, should we make it so you can update from a pre-set URL?  It should just be a matter of filing-out changes, uploading, and downloading like a block download...

Great. Now, should we start talking about downloadable blocks in the Block Library?

Offline

 

#67 2012-04-21 15:34:53

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

dreamod wrote:


WOW I had no idea this had so many bugs. I am so glad you're helping me find bugs. I'm going to add your name to the support, saying 'beta tester: Greenatic' if that's ok.

That's fine  smile   I love debugging other people's programs for some bizarre reason.   tongue

Let me know when there's an update.  And for the final release, should we make it so you can update from a pre-set URL?  It should just be a matter of filing-out changes, uploading, and downloading like a block download...

Great. Now, should we start talking about downloadable blocks in the Block Library?

See my last post.  It has a bug fix for you.

Offline

 

#68 2012-04-21 15:38:26

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Block Files

Sorry if I'm being dense and this has been written somewhere already, but I'm curious as to what adding a block would entail for a user and how the block library will be able to give the code to the user. Does the user use the workspace to file in some code that will create a menu that lets them choose a block file, which will then install that block onto the copy of Scratch, or will they need to use the workspace for every block?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#69 2012-04-21 15:39:15

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

sparks wrote:

Sorry if I'm being dense and this has been written somewhere already, but I'm curious as to what adding a block would entail for a user and how the block library will be able to give the code to the user. Does the user use the workspace to file in some code that will create a menu that lets them choose a block file, which will then install that block onto the copy of Scratch, or will they need to use the workspace for every block?

Ok... Here is how it works. You file in a patch, a rather large one for that matter, but anyways. This patch adds functions to scratch such as importing blocks, exporting, downloading (filing-in contents of an url and updating blocks), editing, viewing source, and much more. When you import a block, you go to a brand new blocks menu, in between the edit and help menu. There you select 'import block'. A dialog then shows up which lets you select a file with a .block extension. Then it files it in and runs a code which installs the block spec. the block spec is like this:

Code:

getNewestBlock
^ #('Sprites' 'control' ('command spec' #- #selector))

When scratch files-in the block, once you select the file, then it calls the method 'getNewestBlock' to import the block spec. It then adds the block spec to a Dictionary.
So basically, you just select a valid block file, and the block importer does the rest. Just like importing a picture or song.

Offline

 

#70 2012-04-21 15:44:31

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Block Files

Wow! That sounds absolutely perfect!  it would also allow us to simply have a block file link next to each block in the library, similar to the BYOB one which will contract the size of the Scratch section SO much! (I get the feeling properly filing in all the blocks we have is going to take quite some time).

Are there any plans for a GUI to make blocks for users to use when submitting?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#71 2012-04-21 15:46:39

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

@Dreamod:  Bug fixes!  Please read!

The block-creation error is caused by there being no extraCodes method at CommandBlockMorph.  That should be fairly easy to fix.

The support ("key not found") error is caused by the lack of any methods at FormatCodeParser.

Last edited by Greenatic (2012-04-21 15:52:02)

Offline

 

#72 2012-04-21 16:03:12

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

@Dreamod:  Bug fixes!  Please read!

The block-creation error is caused by there being no extraCodes method at CommandBlockMorph.  That should be fairly easy to fix.

The support ("key not found") error is caused by the lack of any methods at FormatCodeParser.

1st: extraCodes should be there, I must have made a mistake, It's there now.
2nd: Actually this I just fixed: there was a font not found. 'FCDefault'. I changed it.

Offline

 

#73 2012-04-21 16:07:58

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

sparks wrote:

Wow! That sounds absolutely perfect!  it would also allow us to simply have a block file link next to each block in the library, similar to the BYOB one which will contract the size of the Scratch section SO much! (I get the feeling properly filing in all the blocks we have is going to take quite some time).

Are there any plans for a GUI to make blocks for users to use when submitting?

It wont take too much time to 'convert' the scratch blocks in the library, I could do that.
I'm not sure what 'GUI' means, *googles it*, Golfing Union of Ireland... *looks at second result* - 'Graphical user interface'. Well, there is a nice create a block dialog which lets you create your own block. Here are some links.
Expert Mode
http://www.freeimagehosting.net/n3afc
Easy Mode
http://www.freeimagehosting.net/kcfe1

Offline

 

#74 2012-04-21 16:39:18

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Block Files

dreamod wrote:

Greenatic wrote:

@Dreamod:  Bug fixes!  Please read!

The block-creation error is caused by there being no extraCodes method at CommandBlockMorph.  That should be fairly easy to fix.

The support ("key not found") error is caused by the lack of any methods at FormatCodeParser.

1st: extraCodes should be there, I must have made a mistake, It's there now.
2nd: Actually this I just fixed: there was a font not found. 'FCDefault'. I changed it.

Alright, sounds good.  Is the project patch updated?

Offline

 

#75 2012-04-22 03:35:22

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Greenatic wrote:

dreamod wrote:

Greenatic wrote:

@Dreamod:  Bug fixes!  Please read!

The block-creation error is caused by there being no extraCodes method at CommandBlockMorph.  That should be fairly easy to fix.

The support ("key not found") error is caused by the lack of any methods at FormatCodeParser.

1st: extraCodes should be there, I must have made a mistake, It's there now.
2nd: Actually this I just fixed: there was a font not found. 'FCDefault'. I changed it.

Alright, sounds good.  Is the project patch updated?

Yes, the patch in the project 'Block Importer 2.0' is updated.

Offline

 

Board footer