Hi,
I'd like to be able to do the equivalent of:
dim theSizeOfMe = sizeof (self)
The reason is that I'm trying to prevent a class of bugs where I fail
to update all the code required to save, restore (or transmit &
receive) an object. I add a new field and, say, get interrupted and
forget to do the last update to a method. To help catch this kind of
thing, I'd like to insert code in each of these methods like this:
#if DebugBuild
Assert (sizeof (self) = 20, "wrong size for <this class>.<this
method's name>")
#endif
(It'd be nice too to be able to get class and method names at runtime
w/o having to build them for each class and method.)
Cheers.
Dave
P.S. I tried casting self to be MemoryBlock and using its size
function but that's an illegal cast (no surprise, but worth a try).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>