Bill Roper (billroper) wrote,
Bill Roper
billroper

Plugging Along

I have now gained substantial traction on the project that I'm working on. This gives me hope that I can actually see it running again some time soon.

You know how it goes -- you rip things up, move them around, and until they're all back together, nothing will compile and link. :)

One of the cute things I found:

If you have an embedded object in your compound document file and have a built-in mechanism for disabling its action -- say, for instance, if it's a hot link to another external document that you've added a flag to that says "Don't Use Me!" -- then you can override the IsBlank() function in the base class. If the object says "Don't Use Me", tell IsBlank() to return TRUE, else FALSE.

When you serialize the container document, it counts all of the non-blank items and serializes those, but doesn't serialize any of the blank items. This means that you don't have to clean up the deactivated items when you deactivate them, because your serialization code will do it for you.

This also means that you don't have to recreate the objects during an "Undo" process. All you have to do is unset the "Don't Use Me" flag that you added to the object and it'll pop back up for you, since you didn't delete the item on the fly, but were able to rely on the serialization code to do it for you.

All this would be more useful if there were more people still using compound documents, I suppose...
Tags: musings, tech, work
Subscribe

  • One of Those Days

    Overall, it might have been better to stay in bed today, but that wasn't really an option. I am still slogging through a problem at work. I'm going…

  • Comcast At Work

    So we went to watch some TV that we'd recorded on our Comcast X1 DVR and discovered that -- overnight! -- we had gone from less than 50% full to over…

  • Tired

    I hit the wall late this afternoon. Sleep will follow soon now, but I needed to finish going through the APBA cards for next season. In other news,…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment