Script vs Extension use for CustomDataContainer

Michel_B wrote on 5/6/2010, 2:33 PM
Hi,

I have started experimenting various features of the Vegas scripting library and got some weird behavior when trying to use the CustomDataContainer class.

When I use it in a script and try to serialize a standard string (for test purpose) on the "Project" property of my Vegas object, both the "set" and "get" works without any problem.

However, when I try to do the same thing using the Extensions, it also works but the "set" (SetObject) throws an exception (Catastrophic failure). If I catch it and continue my extension process, I am able to retrieve the CustomData from my Project.

I was wondering if that was a known issue or if you had any clue on what might be doing that difference between using a script vs using an extension.
I did not witness any other weird behavior aside from this one when using either of the approach to extending Vegas.

Thank you very much for the information.

Comments

JohanAlthoff wrote on 5/7/2010, 1:35 AM
Whenever an extension makes changes to the project, it needs to be wrapped in an undo block. There is some info in the docs / release notes that might help you.
Michel_B wrote on 5/7/2010, 5:48 AM
Hi Johan,

Ok I understand now thanks :)
However, I do not seem to recall seeing this in the SDK documentation (HTML docs) provided within the ZIP file concerning the undo block.
Is there some more detailed documentation available?


Thanks a lot again for the help.
Rosebud wrote on 5/7/2010, 8:17 AM
Here