Wednesday, November 23, 2016

AbiathRPC - Scan for level set changes

Today I wrote all the parts of AbiathRPC that are involved in level creation and deletion. When the level set is marked as changed, AbiathRPC compares the current level set against its internal bookkeeping to see if any levels were deleted or added. If anything is found, it notifies the server. When a notification comes in as a result of another client doing something, AbiathRPC pokes at the main form to insert or delete the level as appropriate, then updates its bookkeeping.

Noticing deletion was more difficult than expected because with explicit interface implementation and inheritance, callers that know a real class that implements the interface will always call the original method. Therefore, I had to add an event handler to the level deletion menu itself to run the scan for changes.

I also disabled the Reload Graphics menu item for remote level sets because it would just break things.

No comments:

Post a Comment