Hot Door CORE Forum
document dictionary - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Getting started (http://hotdoorcore.com/forum/forumdisplay.php?fid=6)
+--- Thread: document dictionary (/showthread.php?tid=84)



document dictionary - Rick Johnson - 07-13-2016

Could someone provide some simple sample code for accessing a document's dictionary, storing a few persistent settings (floats and bools), and retrieving them again? I do understand that I need to track notifiers for when documents are created, opened, closed, etc.

I found that a document's dictionary is accessible via the SDK's document suite, but found no dictionary member in the CORE document class. Does a default dictionary already exist, and is it acceptable practice for more than one plugin to store data there?

Any guidance would be very much appreciated. -- rj


RE: document dictionary - Rick Johnson - 07-14-2016

I found the dictionary function in the CurrentDocument class (maybe a future version of doxygen will have a more robust search), which should get me started. Creating my own dictionary within the document dictionary strikes me as a responsible approach, but (full disclosure) dictionaries is an area I've never explored before. I've never been able to find more than technical data on dictionaries so I hope my adventures here don't turn into a menace to other people's data. ;-)


RE: document dictionary - garrett - 07-14-2016

(07-14-2016, 07:18 AM)Rick Johnson Wrote: Creating my own dictionary within the document dictionary strikes me as a responsible approach ...

Yep, that's the right thing to do. Make sure you give your subdictionary a reasonably unique name (e.g. with some prefix based on your plugin name).