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

#301 2009-09-11 02:08:21

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi guys,

thanks for testing BYOB for reporting these glitches. Actually, we fixed the percent-glitch for the official Scratch 1.3.1 version, but I couldn't eliminate all of these cases in BYOB yet. If you get any of these drop down boxes that sometimes occur when you enter the spec incorrectly, just edit the block spec again and set it right. Thanks!


Jens Mönig

Offline

 

#302 2009-09-11 07:23:22

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Is there a way to make a boolean and/or number only input in BYOB blocks?

Offline

 

#303 2009-09-11 17:54:59

Adamman715
Scratcher
Registered: 2009-06-13
Posts: 49

Re: ITopic: Build Your Own Blocks (BYOB)

Hey Jens,

How did you save the IMAGE file?? There is no extras menu, is there a shortcut??? Please help!!


http://gickr.com/results2/anim_be55add9-67f8-bed4-8ddd-85ad04acb8a5.gif ----------The many faces of Windows! -----------------
http://img215.imageshack.us/img215/5564/ubd2448.png

Offline

 

#304 2009-09-12 16:38:47

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

I created a new block and used a "when I receive" block inside it by adding a new message for it. When I saved the block I couldn't find the newly defined message in the message names available in the "broadcast" block.

Is this a bug or a wanted behaviour?

Offline

 

#305 2009-09-13 03:26:07

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens, I keep finding associative arrays (that is lists in which every position can be identified by both a number and a name, for example <insert "john" at "name" of "userdata">) more flexible and intuitive then numerically indexed arrays. Do you think that allowing for associative arrays would be a lot more complex compared to the current implentation of Scratch lists?

Offline

 

#306 2009-09-13 06:10:57

butter1
Scratcher
Registered: 2009-09-06
Posts: 4

Re: ITopic: Build Your Own Blocks (BYOB)

http://dragcave.net/image/jNHC.gifhttp://dragcave.net/image/240p.gifhttp://dragcave.net/image/XRHF.gifhttp://dragcave.net/image/MmQQ.gifhttp://dragcave.net/image/7gHl.gif please click em!


http://dragcave.net/image/G3q2.gifhttp://dragcave.net/image/jNHC.gifhttp://dragcave.net/image/240p.gifhttp://dragcave.net/image/XRHF.gif

Offline

 

#307 2009-09-13 14:54:29

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

No. Never-ever-for-never-ever is spam allowed. We have a dragon egg thread in the inspiration and more section.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#308 2009-09-13 17:57:39

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Stefano,

In current BYOB you can only attach blocks to the template (the function header), everyting else will not be saved in the function definition. This includes "when I receive" event hat blocks (although I agree those would make a formidable additon to function definitions, allowing for almose lambda-wise constructs...).

About those associative arrays, I guess these would correspond to Dictionaries in Smalltalk or Python and would not be hard to implement for Scratch at all. In fact, my very first List prototype (which ist still available for download) was designed on top of Dictionaries (but only used those to fake a Sequential Collection which would not have to be dimensioned or accessed sequentially. So, I'm curious in which other ways  Scratch could benefit from associative Arrays


Jens Mönig

Offline

 

#309 2009-09-13 18:04:58

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Again, is it possible to make boolean and number-only inputs in blocks?

Thanks.

Offline

 

#310 2009-09-14 23:00:31

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

So, I'm curious in which other ways  Scratch could benefit from associative Arrays

Some examples in my kids' Scratch work ...

- a Grapher to store a list of (x,y) points: Dictionary[x->y] works well
- track [Person -> Hi Score] for a game

btw, Jens, is the current BYOB source available? Is there any info on how to get started browsing the BYOB image in Squeak and playing around with it?

Last, any idea who I might ping to see about getting the email notifications option working on this forum?

Thanks! -- Sophie

Offline

 

#311 2009-09-15 02:08:17

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Sophie,

I'd love to share the BYOB source as soon as the Scratch 1.4 source will be posted (I want to avoid accidentally creating a non-official source code disclosure, that's why I locked up the BYOB image some more, supressing the debugger in user mode). I'm not sure when that will be, though. It will be very interesting to see what others make of it.


Jens Mönig

Offline

 

#312 2009-09-15 09:24:33

Thilo
Scratcher
Registered: 2009-03-31
Posts: 24

Re: ITopic: Build Your Own Blocks (BYOB)

I'm trying to fill a triangle in BYOB like dapontes did in this project:

http://scratch.mit.edu/projects/dapontes/230203

Unfortunately BYOB is not able to do the block

<move( (( v <*> (( AC </> AB )) )) )steps>

from the sprite "help2". I always get an internal error.

When I try the code in Scratch 1.4, I don't get any errors. Can somebody help?

Offline

 

#313 2009-09-15 12:54:58

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Thilo,

I'm sorry you are enountering what appears to be a bug in BYOB. Internally BYOB works competely different than Scratch, because I had to modify virtually every method for nestable sprites. That's why I am, in fact, expecting to find some more bugs in BYOB.

Unfortunately I cannot reproduce your error message. I just downloaded dapontes' triangle filling project and tried it in BYOB. It works for me. Could you perhaps e-mail your project to me, so I can try to find out why it isn't working in BYOB?

Thanks!


Jens Mönig

Offline

 

#314 2009-09-15 14:54:07

Thilo
Scratcher
Registered: 2009-03-31
Posts: 24

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens,

I just sent you an e-mail.

Thanks in advance
Thilo

Offline

 

#315 2009-09-15 17:12:20

The-Whiz-test
Scratcher
Registered: 2009-09-03
Posts: 30

Re: ITopic: Build Your Own Blocks (BYOB)

Could you please answer this question?

The-Whiz wrote:

Again, is it possible to make boolean and number-only inputs in blocks?

Thanks.


I'm The-Whiz's test account.
http://i653.photobucket.com/albums/uu259/The-Whiz_photos/Picture40.png

Offline

 

#316 2009-09-15 20:09:33

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi, The-Whiz,

I'm afraid I don't fully understand your question.
You can put any reporter block into the argument placeholders of your custom blocks in BYOB. Yes, that includes booleans, numbers and text. Can you specifically confine a custom block's parameter to a certain type? No. Can you create a custom block which lets users input boolean values via the keyboard? I guess that's up to your creativity  smile


Jens Mönig

Offline

 

#317 2009-09-15 20:14:00

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

What I mean is:
There is a way to make text/number inputs in BYOB. Is there any way to have an only-boolean input, as in the [if <>] block?

Thanks

Wait - I may have figured it out...

Last edited by The-Whiz (2009-09-15 20:15:23)

Offline

 

#318 2009-09-15 21:33:11

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: ITopic: Build Your Own Blocks (BYOB)

Jens - Any thoughts on feasibility of parameters and variables accepting lists and sprites, in addition to numbers, strings, and booleans?

Offline

 

#319 2009-09-16 04:51:01

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Sophie,

not having first class lists and sprites, which can be assigned to variables and passed as parameters really is the most painful limitation of Scratch!

I *have* racked my mind trying to come up with a consistent design about how to at least pass along lists as parameters. The only solution I can think of would be to introduce a new kind of list reference reporter block, which would also have to have a distinct shape setting it apart from the other "num/text" data type, and an additional set of blocks accepting list-reference reporters as arguments.

Another idea would be to introduce a kind of generic object-pointer reporter...

I'd be very interested in your thoughts about this!


Jens Mönig

Offline

 

#320 2009-09-16 04:51:35

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

minor bug fixes

I just fixed a couple of minor bugs relating to the BYOB error detection mechanism (the red outline around erroneous blocks, e.g. divisions by zero) and pushed the release number to BYOB 2.0.1. Be sure to empty your browser's cache before you download the zip file again, and to check if your downloaded version show this number. Thank you, Thilo, for notifying me about the bug in mention!


Jens Mönig

Offline

 

#321 2009-09-16 06:30:55

Thilo
Scratcher
Registered: 2009-03-31
Posts: 24

Re: ITopic: Build Your Own Blocks (BYOB)

Ok, I have tested my project with the latest version. Everythings works fine now. Thank YOU, Jens.

Offline

 

#322 2009-09-21 12:44:09

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hey... iv download BYOB and iv tried it out.

Three things.

1. I cant open any of the examples, they might be corrupted or something.

2. Iv tried the make block. All i can make is math type blocks, with varibles. (Am i doing something wrong here?)

3. Someone said that the mesh was in BYOB. Is that true? or is just you make make it?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#323 2009-09-21 13:13:59

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi markyparky56,

1. you need to open the sample projects with BYOB (not with Scratch), either by dragging/dropping them into the BYOB windows, or by using the File-Open Project menu/dialog.

2. There is some documentation (a pdf) included in the download that should explain the basics of how you can build your own custom blocks (also the non-math ones).

3. You'll find the mesh-network in the Share-menu


Jens Mönig

Offline

 

#324 2009-09-21 13:41:01

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Another idea would be to introduce a kind of generic object-pointer reporter...

I'm inclined towards this generic reporter. I have not thought much through the implications, but I don't think it would be any more error prone than the alternatives, and would be simpler to understand.

Would the reporter probably take a string parameter & return the object reference?

Would it be feasible for this facility to include (something that encapsulated) squeak blocks or message symbols with some #perform: or #value like behavior predefined? So I can do

sprite perform: (self objectPointerReporter: 'method') with: (self objectPointerReporter: 'listA') ?

Regards --- Sophie

[Btw, behind all this I have a feeling that being able to do targeted invocations would be a big step, if it can be done consistent with Scratch's concurrency. Even to use your new (and fantastic!) composite sprites, the parent frequently needs to interact with its children, and I cannot see out how to do this cleanly with just global events].

Offline

 

#325 2009-09-22 00:40:27

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens,

Using the BYOB 2.0.0 rc2 of 22 Aug.

I open BYOB (just with default initial contents) then try to save the project (or export sprite) I get:

Internal Error
Message not understood: findTokens: ...

I suspect I'm doing something wrong. Using on OSX, starting using the image. I've played around with BYOB 2 with no problem, this is the first time I've tried to save something.

Any ideas?

Thanks - Sophie

p.s. until this forum gets email notification working, do you mind if I email you directly when I'm stuck like this at your moenig.org email?

Last edited by itsme213 (2009-09-22 00:41:58)

Offline

 

Board footer