Hi @jordan.johnson,
Could you help me bind a bracket operator in my custom class? By looking at the macro definition, I figured that something like this should work:
void MyObjectArray::bindInterface() const { bindTypedProperty( length, int, &MyObjectArray::GetLength, nullptr ); // ... bindBracketOperator( MyObject, MyObjectArray, int ); } int MyObjectArray::GetLength() const { return this->length; } MyObject MyObjectArray::operator[]( int index ) const { return this->objects[index]; }
but when I try to use it in FlexSim I get
Could not resolve correct operator for [] operation. Left side type is MyObjectArray, right type is int
and also the [...] does not show up in code completion.
Is there a bug or did I misinterpret the arguments to bindBracketOperator?
Thanks!