2011/8/13 Jonas Maebe <jonas.ma...@elis.ugent.be>

> It is always best to isolate such things in a self-contained example that
> does not depend on external code. Does this compile with your Delphi
> version?
>

Yes, I should have done that. The code you gave does not compile.


If not, the issue is something else. It seems more likely to me that there
> is somewhere another "add" method that Delphi picks up but FPC doesn't.
> E.g., there is at least also "TComponent.Add(item : IUnknown) : Integer;".
> While that one won't accept a dynamic array, maybe Delphi 2009 has more add
> methods in TComponent declared with "overload" (although normally searching
> for overloads should stop as soon as a method is found in a class without
> "overload", so in principle the search should stop when tmenuitem.add is
> encountered).
>
> If the above does compile, what does it actually do? Pass the first element
> of the array?
>

The original code which works in Delphi is interesting because it not only
compiles but it also works perfectly, adding those 2 menuitems to mainmenu.

There is no TComponent.Add, neither in VCL nor LCL.
I try to figure out what is happening...

Thanks for replying.

Juha
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to