Documentation issue?

On this doc page:

there is this piece of code:

// synchronize controller to component by using setComponentState
MemoryStream stream; // defined in "public.sdk/source/common/memorystream.h" stream.setByteOrder (kLittleEndian);
if (processorComponent->getState (&stream) == kResultTrue)
{
stream.rewind ();
editController->setComponentState (&stream);
}

However it generates compilation errors on setByteOrder and rewind.
These functions don’t seem to be part of the MemoryStream class.
I’ve replaced rewind by “stream.seek(0,kIBSeekSet,0);”
But what about setByteOrder?
Is that a really necessary call in that context?
Isn’t the plugin’s state data defined by the plugin hence also the byte order?

I have updated the documentation. MemoryStream does not need ByteOrder as it reads/writes only binary blob.

Thanks Yvan :+1:

One more question: Where is “rewind” defined in MemoryStream/IBStream?

rewind is not part of MemoryStream, I have adapted the example code. Thanks

Thanks