Board index » delphi » Overloaded functions in ActiveX

Overloaded functions in ActiveX


2003-11-08 03:25:45 PM
delphi50
Hi,
Doesn't ActiveX support overloaded functions? I am trying to convert an
existing VCL Component into an ActiveX component, and while using the Delphi
wizard, I find that the overloaded function I have are not transferred to
the ActiveX Wrapper Implementation. I find that only one of the methods are
transferred.
I also tried to edit the Type Library to add a method with same name, but it
says that 'Name already exists'.
How can I have my overloaded functions in ActiveX?
Thanks in advance.
 
 

Re:Overloaded functions in ActiveX

<<Sam:
Doesn't ActiveX support overloaded functions?
Quote
>
No. Because ActiveX controls have to be compatible with
other languages, which don't have them. So you have either
to give your functions different names, or use variant
parameters and check their type at run time.
--
Deborah Pate (TeamB) delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
www.borland.com/newsgroups/genl_faqs.html
 

Re:Overloaded functions in ActiveX

Thanks Deborah. I guess using different function names will be better than
using variants.
"Deborah Pate (TeamB)" <XXXX@XXXXX.COM>wrote in
message news:XXXX@XXXXX.COM...
Quote
<<Sam:
Doesn't ActiveX support overloaded functions?
>>

No. Because ActiveX controls have to be compatible with
other languages, which don't have them. So you have either
to give your functions different names, or use variant
parameters and check their type at run time.

--
Deborah Pate (TeamB) delphi-jedi.org

TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
www.borland.com/newsgroups/genl_faqs.html