If your program exits I would hope you close the document. When you close
it all the blocks will be detached.
> But I do need it unusable, right?
Yes.
> I tried fiddling with the threads, and I found this out: If I run the code
> from the ui thread, like I originally was, the calls to the vm objects
hang.
> If I run the code from the process thread, the calls work but I can't add
> the objects to the UI tree. It complains about locking the object block
from
> the wrong thread. Next I tried doing everything but the adding children in
> the process thread, and sending a message to the application object to do
> the children adding. That causes it to kinda work, but the new objects are
> unstable and don't always add correctly, or if they do they don't work
right.
This is what I do in Draw, from the process thread, and it works:
@call DPrimary::MSG_GEN_ADD_CHILD( @DTranGroup,
( CCF_MARK_DIRTY | TRANSFORM_MENU_POSITION ) );
@call DTranGroup::MSG_GEN_SET_USABLE( VUM_DELAYED_VIA_APP_QUEUE );
Nathan