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

#1 2010-11-21 05:48:56

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

List object deletion block

I really hate doing this:

http://lh4.ggpht.com/_mXv3HQnoqXY/TOj4jpT9vtI/AAAAAAAACOI/5_HsTG5qoKU/Screen%20shot%202010-11-21%20at%207.46.17%20PM.png

So why not have a block like this:

http://lh3.ggpht.com/_mXv3HQnoqXY/TOj3nUghpfI/AAAAAAAACOE/JUfRl8Nrirs/Screen%20shot%202010-11-21%20at%207.40.53%20PM.png

It would search in a certain list for an item containing whatever you write in the first braket. Then it would delete that item.

Would someone mind making a suggestion for this? I'm out of votes.  sad

I rewrote my explanation here: http://scratch.mit.edu/forums/viewtopic … 63#p607263

Last edited by iCode-747 (2010-11-25 17:57:44)


-End Transmission-

Offline

 

#2 2010-11-21 16:44:05

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

Arr.

I think that this forum is under-visited.  tongue

Bump.  sad


-End Transmission-

Offline

 

#3 2010-11-21 16:45:25

12three
Scratcher
Registered: 2008-06-12
Posts: 1000+

Re: List object deletion block

This would really help. I really could have used it in my science fair project.

Offline

 

#4 2010-11-21 16:50:26

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

12three wrote:

This would really help. I really could have used it in my science fair project.

Exactly.  big_smile

I find that when I do really list-involved projects, this block could really help me.  big_smile


-End Transmission-

Offline

 

#5 2010-11-23 17:55:18

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

Bump.


-End Transmission-

Offline

 

#6 2010-11-25 16:20:17

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

This is so sad. Bump.


-End Transmission-

Offline

 

#7 2010-11-25 17:06:15

yoshidude56
Scratcher
Registered: 2010-01-12
Posts: 100+

Re: List object deletion block

We already have a block like that, unless you mean deleting the WHOLE list. Then, I agree. Also, deleting sprites, etc.

Last edited by yoshidude56 (2010-11-25 17:06:28)


http://i46.tinypic.com/2ut2ir4.png

Offline

 

#8 2010-11-25 17:17:50

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: List object deletion block

sounds good, although i don't really understand the block


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#9 2010-11-25 17:57:09

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

It will find an item containing what you put in the first space, in the specified list.  wink


-End Transmission-

Offline

 

#10 2010-11-25 22:10:20

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: List object deletion block

Yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes YES!  big_smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#11 2010-11-26 03:33:03

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

:d


-End Transmission-

Offline

 

#12 2010-11-26 16:33:48

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: List object deletion block

Even better - this block:

(position of [thing] in [List1 v])


I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#13 2010-11-26 16:38:32

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: List object deletion block

bigreader wrote:

Even better - this block:

(position of [thing] in [List1 v])

Another great block.

Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.

In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.  wink

Offline

 

#14 2010-11-26 16:43:18

johndo77
Scratcher
Registered: 2010-07-30
Posts: 1000+

Re: List object deletion block

coolstuff wrote:

bigreader wrote:

Even better - this block:

(position of [thing] in [List1 v])

Another great block.

Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.

In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.  wink

How about, location of instance [1] of [thing] in [list v]


Crizapples

Offline

 

#15 2010-11-26 16:53:18

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: List object deletion block

johndo77 wrote:

coolstuff wrote:

bigreader wrote:

Even better - this block:

(position of [thing] in [List1 v])

Another great block.

Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.

In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.  wink

How about, location of instance [1] of [thing] in [list v]

That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?

Offline

 

#16 2010-11-26 20:31:43

hdarken
Scratcher
Registered: 2008-06-26
Posts: 1000+

Re: List object deletion block

Very good idea, I support.


http://i.imgur.com/VskBk.png
http://i.imgur.com/tgxVZ.jpg

Offline

 

#17 2010-11-26 20:41:18

johndo77
Scratcher
Registered: 2010-07-30
Posts: 1000+

Re: List object deletion block

coolstuff wrote:

johndo77 wrote:

coolstuff wrote:


Another great block.

Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.

In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.  wink

How about, location of instance [1] of [thing] in [list v]

That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?

It would probably just skip the block.


Crizapples

Offline

 

#18 2010-11-26 21:04:22

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: List object deletion block

johndo77 wrote:

coolstuff wrote:

johndo77 wrote:


How about, location of instance [1] of [thing] in [list v]

That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?

It would probably just skip the block.

That could cause some errors in the project. Maybe it would return 0 or null?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#19 2010-11-26 21:07:36

johndo77
Scratcher
Registered: 2010-07-30
Posts: 1000+

Re: List object deletion block

Harakou wrote:

johndo77 wrote:

coolstuff wrote:


That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?

It would probably just skip the block.

That could cause some errors in the project. Maybe it would return 0 or null?

0 would cause problems...


Crizapples

Offline

 

#20 2010-11-26 21:17:34

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: List object deletion block

Support'd

johndo77 wrote:

Harakou wrote:

johndo77 wrote:


It would probably just skip the block.

That could cause some errors in the project. Maybe it would return 0 or null?

0 would cause problems...

Just have it report nothing.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#21 2010-11-27 01:38:11

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

Yes. :3

Everyone's doing all the hard thinking for me.  tongue


-End Transmission-

Offline

 

#22 2011-01-01 11:14:12

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

Bump.


-End Transmission-

Offline

 

#23 2011-01-05 13:35:09

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

Bump to the top.


-End Transmission-

Offline

 

#24 2011-01-06 11:41:16

nmuta
New Scratcher
Registered: 2010-09-22
Posts: 2

Re: List object deletion block

I am interested in this as well.

The other thing I really want to know is..... is there a way to dynamically delete sprintes on the stage with code? In other words make a list that contains references to sprites on the stage, and when you delete the list item, the graphic disappears as well?

Please advise !

Offline

 

#25 2011-01-12 03:57:49

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: List object deletion block

No. I don't think there is a way to delete sprites without hacking into Squeak, sorry.  sad


-End Transmission-

Offline

 

Board footer