Discuss Scratch
- BosenChang
-
1000+ posts
"Delete all occurrences of" block
Hmm, you got that point right. (This would have worked a lot easier if dropdowns in custom blocks was added. Dang it!)-snip-
Yes, I get that there is a functional workaround for thedelete all occurrences of ( ) in [list v] :: list
But what about deleting all occurrences across multiple lists?
- criticize
-
33 posts
"Delete all occurrences of" block
(Removed)
Last edited by criticize (April 6, 2022 07:09:20)
- scratchastroLOL
-
1000+ posts
"Delete all occurrences of" block
why do you support? please be constructive Support.
- BosenChang
-
1000+ posts
"Delete all occurrences of" block
A Support.New Scratcher! doesn't know much about Scratch.
- leahcimto
-
1000+ posts
"Delete all occurrences of" block
Ok people, lets get back on topic.
Support! I would not have to use this much, but I can see how this would be useful for other people.
Also to all you guys saying there is a workaround, a lot blocks have a work around, even the forever block has a workaround, but that does not mean that they can't get added
Support! I would not have to use this much, but I can see how this would be useful for other people.
Also to all you guys saying there is a workaround, a lot blocks have a work around, even the forever block has a workaround, but that does not mean that they can't get added
- ggenije
-
500+ posts
"Delete all occurrences of" block
Yes, I get that there is a functional workaround for thedelete all occurrences of ( ) in [list v] :: list
But what about deleting all occurrences across multiple lists?
Your suggestion is too specific.
The point for the scratch block is that they have general use, that means they are very diverse - their usage have diversity,
unlike them your suggestion will have usage 0.0000000000001% compared of other blocks, because only 0.000001% scratchers will use the block in 0.001% projects 0.001% times..
Analogy for the suggestion
set [color v] effect to (20) for all sprites ::looks
You can see there is obvious workaround , but that block is not diverse to be enough useful of every scratcher, just like your suggestion,
You surely don't have 100 lists , so you can't simple do the previous workaround 100 times.
This is the working workaround:
define delete all instances of (name) in my lists
set [i v] to (length of [myList1 v] :: list)
repeat (length of [myList1 v] :: list)
if <(item (i) of [myList1 v] :: list) = (name)> then
delete item (i) of [myList1 v]::list
end
change [i v] by (-1)
end
//
set [i v] to (length of [myList2 v] :: list)
repeat (length of [myList2 v] :: list)
if <(item (i) of [myList2 v] :: list) = (name)> then
delete item (i) of [myList2 v]::list
end
change [i v] by (-1)
end
...
set [i v] to (length of [myListN v] :: list)
repeat (length of [myListN v] :: list)
if <(item (i) of [myListN v] :: list) = (name)> then
delete item (i) of [myListN v]::list
end
change [i v] by (-1)
end
When your suggestion would be reasonable, that means you also can expect from ST to make block
import minecraft::pen
- fdreerf
-
1000+ posts
"Delete all occurrences of" block
Can't that be reduced to: This is the working workaround:-snip- ::grey
repeat until <not <[list v] contains [thing] ?>>
delete (item # of [thing] in [list v] :: list) of [list v]
end
- KittyFireSt0rm
-
1000+ posts
"Delete all occurrences of" block
Can't that be reduced to: This is the working workaround:-snip- ::greyrepeat until <not <[list v] contains [thing] ?>>
delete (item # of [thing] in [list v] :: list) of [list v]
end
Yes it could be, and I'm currently using that workaround, but I still have hope for this suggestion
- chrdagos
-
500+ posts
"Delete all occurrences of" block
o.k but what would the-snip-
Again, I am aware of a workaround, for thedelete all occurrences of ( ) in [list v] ::listblock.
The other blockdelete all occurences of ( ) ::listis more of a hassle to workaround.
delete all occurences of ( ) ::listblock do?
- KittyFireSt0rm
-
1000+ posts
"Delete all occurrences of" block
-snip-
It does exactly what it looks/sounds like, it deletes every occurrence of (foo) in all lists
Last edited by KittyFireSt0rm (Aug. 17, 2020 16:59:12)
- j3r0_plays
-
100+ posts
"Delete all occurrences of" block
Workaround is EASY… And this is required only in pretty rare occasions… So no.
- KittyFireSt0rm
-
1000+ posts
"Delete all occurrences of" block
Workaround is EASY… And this is required only in pretty rare occasions… So no.
The next costume block has an easy workaround, the change variable by foo block has an easy workaround, and they still exist. However you are correct that this is only needed in rare occasions, but it's still useful, and less annoying than having to delete all occurrences of a thing in each list individually