Objects (Snap! 12)

Project (Snap! 12)

You can store data using objects. There are some examples in the project editor.

Disclaimer!

DIsclaimer!

I made this before Snap! version 12 was entirely published.
That means I made it in Snap! version 12RC.
So, this project sometimes will operate in a wrong way.

Current blocks

Current blocks

  • Blocks which are supported in the OOP library
  • fields of object
  • does field field exist in object?
Contribution

Contribution

  • Do you want to add a block? If you want to, feel free to ask!
  • Found a bug? Feel free to fix!

I would recommend changing the category color to be something with higher contrast.

Done! You can check the editor to see what is changed.

Before

After

much better, I like it!

This is just a suggestion, but you should have a is (object V) a prototype of (object V)? :: #808000 predicate block. In purely prototypical OOP, you can check if an ‘instance’ (e.g. the point instance in your point program) has ‘point’ in it’s prototype chain, to check if an object is an ‘instance’ of another.

Other than that, really good! Would use over the regular OOP library