Archive: Array plugin - SetAutoReDim fails


Array plugin - SetAutoReDim fails
Hi,

I've used SetAutoReDim on four other places in the installer I'm working on... everything worked fine.

Now I'm calling

# Initialize array
${rebootFunctionsArr->Init}
${rebootFunctionsArr->Inited} _arrayInited 0
[...]

_arrayInited:
ClearErrors
# Configure auto redimension
${rebootFunctionsArr->SetAutoReDim} 8 8
${If} ${Errors}
MessageBox MB_OK "Error"
SetErrors
Goto _end
${EndIf}

_end:


I'm always getting a error from SetAutoReDim. But the debugger shows me that the values have been changed correctly.
In addition to that: The debugger shows the first array I've ever created and used (successfully) during the installtion has the defualt values for AutoReDim - even if I've have configured it for 8 and 8 before and it worked the whole time as it should. I've I'm removing all other arrays, the error stays the same but the debugger said that it worked...

Write or shift a value doesn't work for this array neither.


Could it be a problem with the plugin or a memory problem?

Thanks :)

CJ

It is a small bug in the plugin and will not effect any functionality. Most of the plugin functions push 0 onto the stack on success (non 0 otherwise) but this is not being done for SetAutoReDim. I will fix when I have the time.

Stu


Thanks AfrowUK! :)

Does it mean I have to pop it from stack? There was no need for me to do it before. o.O And why does it only affect one of four SetAutoReDims? And only for this array I have also problems doing readin and writing..?

CJ


Ok, I have to blame myself. Writing the array works. I've just added a security mechanism that disables the writing if a error occurres. I've forgot about that while I tried to understand what I've done wrong using SetAutoReDim.

Sorry :cool:

CJ