Skip to Content
author's profile photo
Former Member

Menu Event - can't access object

Hi,

I can't access the object for the menu event using SBO 6.5.

If I try to read a property, e.g. MenuUID, I get the error message "Invalid Variant Operation".

I'm using Delphi and the parameter "pval" is defined as OleVariant.

On the other side, I can access the object for the ItemEvent without any problems.

Does anyone have an idea how to solve the problem?

Obviously it seems to work fine with VB.

Thanks,

Gerold

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Jul 28, 2004 at 08:28 PM

    Hi Gerold,

    I had the same problems, Delphi works fine with the DI SDK, but it doesn't work well with the UI SDK - not well at all! As you already know, you can't access the pVal parameter object in item events, and you will also find that there are lots of properties which are read-only in Delphi - properties you need to set if using the UI.

    I switched to C#, as it handles both the UI and DI and only use Delphi for DI requirements like data integration. This is probably not very comforting news for you.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Lita,

      Thanks for your reply.

      I CAN access the pval parameter object in Item Events but CANNOT the parameter in Menu Events.

      I suppose the problem with the pval object in the menu event is caused by name collisions with the Delphi VCL.

      So far I had no problems with read-only properties in Delphi. Maybe because I started only a few weeks ago.

      Using two languages means two applications (add-ons) that you have to register. That's no fun at all.

      Regards,

      Gerold