joha

EditTask not shown in dropdown of tasks

Discussion created by joha on Aug 23, 2011
Latest reply on Aug 24, 2011 by joha
I've got two very similar classes implementing the IEditTask interface. The two tasks shows up in the dropdown-menu of tasks (ArcMap 9.3.1) both on my computer and on my collegues. But on my clients computer only one of them shows up... I've been searching through the Categories-application and both tasks seem to be registered correctly.

There has been some earlier extensions also named "Blabla" which wasn't uninstalled correctly (found them when searching through the registry), but none of them had the exact same name or guid.

Any ideas?

using System;
using System.Runtime.InteropServices;
using ESRI.ArcGIS.ADF.CATIDs;
using ESRI.ArcGIS.Editor;

namespace Blabla
{
  [Guid("e5f0320f-d2fc-4b5d-8e26-0b310b8b7178")]
  [ClassInterface(ClassInterfaceType.None)]
  [ProgId("Blabla.ALine")]
  public class ALine : IEditTask
  {
    #region Private fields

    private readonly GeometryGenerator m_generator = new GeometryGenerator();

    #endregion

    #region Component Category Registration

    [ComRegisterFunction]
    [ComVisible(false)]
    static void RegisterFunction(String regKey)
    {
      EditTasks.Register(regKey);
    }

    [ComUnregisterFunction]
    [ComVisible(false)]
    static void UnregisterFunction(String regKey)
    {
      EditTasks.Unregister(regKey);
    }

    #endregion

    #region Implementation of IEditTask

    public void Activate(IEditor editor, IEditTask oldTask)
    {
      m_generator.Activate(editor);
    }

    public void Deactivate()
    {
      m_generator.Deactivate();
    }

    public string Name
    {
      get
      {
        return "ALine";
      }
    }

    public void OnDeleteSketch()
    {
    }

    public void OnFinishSketch()
    {
      m_generator.FinishSketch();
    }

    #endregion
  }
}


using System;
using System.Runtime.InteropServices;
using ESRI.ArcGIS.ADF.CATIDs;
using ESRI.ArcGIS.Editor;

namespace Blabla
{
  [Guid("232c11f1-f1ee-44ab-80f7-3d3398021c97")]
  [ClassInterface(ClassInterfaceType.None)]
  [ProgId("Blabla.BLine")]
  public class BLine : IEditTask
  {
    #region Private fields

    private readonly GeometryGenerator m_generator = new GeometryGenerator();

    #endregion

    #region Component Category Registration

    [ComRegisterFunction]
    [ComVisible(false)]
    static void RegisterFunction(String regKey)
    {
      EditTasks.Register(regKey);
    }

    [ComUnregisterFunction]
    [ComVisible(false)]
    static void UnregisterFunction(String regKey)
    {
      EditTasks.Unregister(regKey);
    }

    #endregion

    #region Implementation of IEditTask

    public void Activate(IEditor editor, IEditTask oldTask)
    {
      m_generator.Activate(editor);
    }

    public void Deactivate()
    {
      m_generator.Deactivate();
    }

    public string Name
    {
      get
      {
        return "BLine";
      }
    }

    public void OnDeleteSketch()
    {
    }

    public void OnFinishSketch()
    {
      m_generator.FinishSketch();
    }

    #endregion
  }
}

Outcomes