View Single Post
Old 21st August 2012, 14:27   #146
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Originally Posted by TVNST View Post
I think I had both the first and the second value setting an error flag on different occasions.
However, the array stores more than just one Registry-Action.
All registry actions in the NSIS code are first gathered in the array and then executed in a loop through all registry actions.
The idea behind that is to implement a rollback on errors mechanism similar to MSI installers which is not supported by NSIS by default.
Therefore, the error flag was set on something like nsArray::Get aRegActions 42 since it wasn't in the first registry action, it was somewhere inbetween.

The JSON plugin uses a file which is not what I want. I could also have used an ini file in this case.
File errors are the most likely errors that can occur in an installation and I want to avoid to make an error check on each write or read operation.
Therefore I'd prefer to keep those actions in the memory.
I'll look into the nsArray issues when I can. As for nsJSON you don't need to use files at all. You can create and manipulate a JSON tree in memory.

Afrow UK is offline   Reply With Quote