I'm using Squirrel 2.1.1. Is it possible to add new slots to an existing instance of a class?
ie.
class cFoo
{
constructor()
{
print("made an instance");
}
}
local fooBar = cFoo();
fooBar.index <- 1;
print(fooBar.index);
This gives me the following error: "AN ERROR HAS OCCURED [indexing instance with string]".
I know that you can add slots to a class that hasn't been instantiated yet. But can you add slots to an instance of a class?
If not is it a planned feature?
I would normally use an extended class, but I need a bit more flexibility than that for what I need to do. I need something somewhere between a table and a class, basically.
Thanks alot guys.