Microsoft MakeCode

Delete enum property on drop down

I’m very, um, to say the least, finicky about variables that aren’t needed. So whenever I drag a block out that uses a sprite, I go to the Variables category and delete mySprite after dealing with the block of code.

The same goes for enums. But you have to go to text mode and remove the property* from the enum and I don’t want to risk the editor moving everything around. (I know you guys are working hard on it though)

Especially using the BlockObject extension (Thanks @Dreadmask197 for the link):
image
I will never name a property called myStr, so I really want to delete it. Maybe you could right-click it and present some options like rename and delete.


*Also, what is the actual name of the “thing” inside an enum? I don’t think it’s called a property.

SAME!

Sorry, I just had to say it.

1 Like

Hm, it’s not possible right now, seems feasible to support removing user defined kinds in the future (@richard?). I’d imagine we’d have to disable it for the predefined ones (i.e. Player, Enemy for SpriteKinds) as they’re declared in common-packages / not the user code.

The thing inside of an enum is typically called a member (specifically an enum member). Possibly worth noting that in this case, arcade block objects's blocks do not create enums – they define a namespace that creates constants of the given name, as we do not currently support extending enums. Just a small subtlety, they otherwise behavior very similarly to enums within blocks. (The feature of adding constants instead of enums is newer / the design was based off the enums dropdown in the first place)

1 Like

Yeah, we could probably do it. Probably just do the same thing we do when deleting variables.

1 Like