Friday, July 1, 2016

Policy Plus - Late loading

Yesterday, I wrote a little bit of code for Policy Plus that assembled the AdmxCategory structures into the more object-oriented PolicyPlusCategory structures. My implementation had a problem, though. If a new ADMX file was added after the call to LoadFolder, RawCategories would be empty and it wouldn't be able to resolve references to categories defined in ADMX files that were loaded earlier. So, I added a temporary dictionary and a function that searches both that and the existing categories. There's actually still a flaw in my most recent commit - the Categories dictionary doesn't contain child elements, so late-loaded categories can only reference existing top-level categories. That's fixed, but I have more changes I want to make (getting the other kinds of resources object-ified) before I push a new commit.

No comments:

Post a Comment