> (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);
>
Edward, something about this code snippet was bothering me, and I finally saw
it, as it's different from something I'm doing, which to be honest, is
something similar to what you're doing. Here's my code snippet, and if you
look at it, I think you'll see what is different:
----snip----
@method UIPrimClass, MSG_CREATE_NEW_PRIMARY
{
optr newPrim;
newPrim = ObjInstantiate(OptrToHandle(oself),
(ClassStruct *)&GenPrimaryClass);
pself = ObjDerefGen(oself);
@call self::MSG_GEN_ADD_CHILD(newPrim, (CCF_MARK_DIRTY | CCO_LAST));
@call newPrim::MSG_GEN_SET_USABLE(VUM_DELAYED_VIA_UI_QUEUE);
@call newPrim::MSG_GEN_SET_ENABLED(VUM_NOW);
}
---------------snip---------------
You are updating your object too soon by setting it usable(VUM_NOW) rather
than (VUM_DELAYED_VIA_UI_QUEUE);
If you change this, you may find you have a little less problem with your
object.
Lee