I checked my gp file and saw I had the document stuff marked as ui-objects
instead of objects. When I switched it it worked. But when I did that it
started crashing when I tried to add new objects to the UI tree. Said the
object block was being locked by the wrong thread. I'm calling the
Application object and telling it to add a new primary. This works in Ensemble.
Next I tried moving it back into the UI thread with a 20k stack. Still
overflowed the stack.
Next I tried making it single threaded with a 20k stack. Made it further
before crashing. It made it up to the line where I try to replace a moniker
based on what I read from the file. Complains about an invalid handle. Don't
know what handle it could be complaining about. All the other object calls
succeed.
(the variables are all declared correctly)
newitem = ObjInstantiate(ObjectBlock, (ClassStruct *)&BasicItemClass);
@call ObjectList::MSG_GEN_ADD_CHILD(newitem, (CCF_MARK_DIRTY | CCO_LAST));
@call newitem::MSG_GEN_ITEM_SET_IDENTIFIER(1);
@call newitem::MSG_GEN_SET_USABLE(VUM_NOW);
@call newitem::MSG_GEN_SET_ENABLED(VUM_NOW);
{
char name[33];
primarydata = primaryVM = VMLock(file, primaryVMHandle, &objHandle);
strcpy(name, primarydata->name);
@call newitem::MSG_GEN_REPLACE_VIS_MONIKER_TEXT(name, VUM_NOW);
VMUnlock(objHandle);
}
------------------------------------------------------------------------
| I've always been afraid to die, but I think I'm more afraid to live. |
| -Billy Corgan, Smashing Pumpkins, The Aeroplane Flys High |
------------------------------------------------------------------------
| Edward Di Geronimo Jr. edwdig@bergen.org |
------------------------------------------------------------------------