public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc, TclCmdDeleteProc deleteProc)
        {
            TclCmdToken token;

            TclCmdProcWrapper       cmdWrapper    = new TclCmdProcWrapper(this, proc);
            TclCmdDeleteProcWrapper deleteWrapper = new TclCmdDeleteProcWrapper(this, deleteProc, cmdWrapper);

            unsafe {
                token._token = TclNative.Tcl_CreateCommand(_interp, cmdName, cmdWrapper.Callback,
                                                           IntPtr.Zero, deleteWrapper.Callback);
            }

            return(token);
        }
Exemple #2
0
 public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc, TclCmdDeleteProc deleteProc) {
     TclCmdToken token;
     
     TclCmdProcWrapper cmdWrapper = new TclCmdProcWrapper(this, proc);
     TclCmdDeleteProcWrapper deleteWrapper = new TclCmdDeleteProcWrapper(this, deleteProc, cmdWrapper);
 
     unsafe {
         token._token = TclNative.Tcl_CreateCommand(_interp, cmdName, cmdWrapper.Callback, 
             IntPtr.Zero, deleteWrapper.Callback);
     }
     
     return token;
 }