V17. InsertFunction dialog crash on custom IIntelliSenseFunction

Posted by: niels on 3 February 2024, 9:17 am EST

    • Post Options:
    • Link

    Posted 3 February 2024, 9:17 am EST

    CustomFunction works nice! Except the InsertFunction dialog crashed if the IIntelliSenseFunction interface was used.

    public class MhCompound: Function, IIntelliSenseFunction
    ....
    spread.AddCustomFunction(new MhCompound(spread));

    Click in InsertFunction dialog on MH.Compound, causes exception

    I think it is because formulaEngine.GetFunction does not return custom functions:

    var formulaEngine = ((WorkbookBase)spread.AsWorkbook()).FormulaEngine;
    var cmd = formulaEngine.GetFunction("MH.Compound")
  • Posted 3 February 2024, 9:17 am EST - Updated 3 February 2024, 9:23 am EST

  • Posted 5 February 2024, 5:14 pm EST

    Hi Niels,

    We could replicate the issue on our end. We are in discussions with the developers regarding this behavior. [Internal Tracking ID: SPNET-36705]

    We will update you on this as soon as we hear back from them.

    Thanks & Regards,

    Aastha

  • Posted 6 February 2024, 6:16 pm EST

    Hi Niels,

    This issue is generally caused when do not define the getter for Overloads property correctly. You can define the Overloads property as shown in the following code snippet to eliminate this issue:

    public int Overloads { get=>1; }

    Kindly refer to the attached sample for full implementation. See IIntelliSenseFuncDemo.zip

    If your use-case scenario differs, please provide a stripped-down version of your sample application or update the attached sample so that we can get a better understanding of your issue.

    Thanks & Regards,

    Aastha

  • Posted 6 February 2024, 11:30 pm EST

    Hi Aastha,

    Best support ever. Thank you! that works.

    Best regards,

    Niels

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels