Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With these changes I could run my UITest program and have my checkbox settings loaded on startup and saved on exit with the Links.Load() and Links.Save() method calls. 

Cleaning up the code

But there were still a few things that bothered me about the code. For one, while I'd created a class to maintain the queue of record associations, the class really didn't add any value. It was simply a container for the class. So I got rid of the class and declared the queue type in CML_Data_ManyToManyLinksDataQ.inc:

...

Everywhere I had previously used the class and the queue reference, I now used just the queue reference. That took a bit of searching and replacing, and when I was done I ran my unit tests again to make sure I hadn't messed anything up. 

Storing data efficiently

Another thing I didn't like about the class was the brute force approach to saving data. If I had fifty linking records and I removed one of them, why not just remove that single record instead of wiping out all the records and recreating all but one? 

...