zoukankan      html  css  js  c++  java
  • Modify default Creator of GenDoc at Create

    1、edit gendoc.met to contains:
      attach message DoCreatePre to GenDoc in server bbksvr;
    2、edit gendoc.mth to contains:
    message GenDoc:DoCreatePre
       (
           update:        ObjectPtr        thisObj::
           update:        ObjectPtr        dialogObj::
           update: NULL   SetOfStrings*    extraStr::
           update: NULL   SetOfObjects*    extraObj::
           output:        integer*         mfail
       ) code
    {
       MODNAME("GenDoc:DoCreatePre");
       status dstat = OKAY;
       *mfail = USC_OKAY;
     
       if ( dstat = DoCreatePreAt(GenDocClass, thisObj, dialogObj, extraStr, extraObj, mfail) )
       {
           goto EXIT;
       }
      
       if ( dstat = objSetAttribute(thisObj, CreatorAttr, "hcf") )
       {
           goto EXIT;
       }
    CLEANUP:
     
    EXIT:
       if ( dstat != OKAY )
       {
           uiShowFatalError(dstat, WHERE);
       }
       return (dstat);
     
    }
    ;
     
    注意:
    1. DoCreatePreAt的调用时,要加多一个参数ClassName,例如GenDocClass;
    2. objSetAttribute 的作用为设置对象的属性,这里设置GenDoc新对象的Creator属性为"hcf".
  • 相关阅读:
    权限管理命令
    常用命令2
    常用命令1
    queue
    poj 3984
    L3-008 喊山 (30 分)
    常州大学新生寒假训练会试 I 合成反应
    dfs 的全排列
    poj 1154
    hdu 1241
  • 原文地址:https://www.cnblogs.com/hcfalan/p/422592.html
Copyright © 2011-2022 走看看