1 Reply Latest reply on May 27, 2006 1:36 AM by CyBORG

    Potential Bug

    CyBORG
      I've compiled a .NET class as a COM object and I am able to instantiate it from all possible implementations including JScript;
      When I instantiate the object through coldfusion using the following:

      <cfscript>
      tApp = CreateObject("COM", "Slon.HistoricalPrices");
      tApp.AutoImport = true;
      tApp.ToString();
      </cfscript>

      It correctly instantiates the object and sets the .NET property to true however when executing any public method within the implementation even ToString(), it throws an error "The selected method ToString was not found. ", it throws this error for any public methods. It works fine if I comment out any references to public methods.

      JScript version of same code works:
      var tApp = new ActiveXObject("Slon.HistoricalPrices");
      tApp.AutoImport = true;
      alert(tApp.ToString());
        • 1. Re: Potential Bug
          CyBORG Level 1
          I was able to fix it

          <cfscript>
          tApp = CreateObject("COM", "Slon.HistoricalPrices");
          tApp.AutoImport = true;
          tApp.ToString; <----- Calling method without parenthesis works!!!
          </cfscript>

          Is that a bug? I've always seen empty method implementations called with the set of parenthesis