Is it possible to ReDim an array or to remove an element from an array? Both from the docs and the header files it doesn’t seem possible.
Doesn’t answer your question directly, but you can remove elements from a Dictionary. I tend to use these in place of arrays quite a lot these days…
I must be missing something here… Is a RealArray the same as normal Arrays?
Forget it. I’ve noticed it’s plugin SDK.
Ah ok, I think its a plugin from MonkeyBread - should have checked that first, oops.
Every time I think I’m being helpful, I find I’ve misunderstood
May I ask why you need a to use a REALArray ? It does not seem terribly friendly, indeed the LR does not mention Remove or Redim (although maybe a Create of the same variable may work), and it is not even compatible with the C Array ?
You use it with plugins that you need to pass arrays to / from user code in xojo
You can’t pass a C array to user code and expect it to be an array in Xojo code
These are the functions in the SDK for REALarray:
Is there a way to remove an element (“REALRemoveArrayValue”)?
Short of creating a new array & copying over the values from the original without the one you want to drop I don’t think so
Our plugins return new arrays as we have no way to remove.
(Except hacking data structures)
for parameters, byref is a way. So plugin and free old array and create new one.