|
-
May 8th, 2000, 06:06 PM
#1
Is there anyway to do that? I'm making a wrapper for some functions and want to keep it compatible with the original, so i need a Sub Close in my class.
-
May 8th, 2000, 06:27 PM
#2
Member
I think this is not possible in VB6.
It is possible in VB7. Because Functiona overloading is introduced in it.
Am I correct?
-
May 8th, 2000, 08:14 PM
#3
Yeah like i have time to wait for VB7.
And i couldn't find it so i posted here to see if someone knew the awnser, not to tell me that it can not be done(already know that it can't be done but maybe someone knows a trick)(No offence).
-
May 9th, 2000, 12:17 AM
#4
the closest that you'll get is by appending a letter to the end of the name:
Call SplitA("blah blah")
where the restricted keyword would be Split()
I cant wait until the new error handling stuff comes out in VB7, sounds very cool
-
May 9th, 2000, 12:33 AM
#5
Addicted Member
Hi
I'm not 100% sure on this, but I think that you can enclose the restricted word in square brackets [close] to overcome this. I,m far from being a VB expert, perhaps one of the many experienced players on this forum can confirm this/or not as the case may be.
Sorry I can't help you any further
GRAHAM 
-
May 9th, 2000, 12:41 AM
#6
Frenzied Member
Well you shouldn't really call it close anyway, it'll confuse you If you need to use the Close Keyword. Callit Something else CloseApp or something.
-
May 9th, 2000, 12:43 AM
#7
Fanatic Member
I think the problem is the other way round:
if you make (eg) as split function you cannot use the VB
split function. Square brackets work, but appending a
letter to the function name would be better, I think.
-
May 9th, 2000, 04:06 AM
#8
The [Close] doesn't seem to work.
I tried Private Sub [Close] but it still gives me the same error(also tried this with other keywords, same error).
And i know it would be better to call it CloseA or something but i need it to be called Close. I'm trieing to create a wrapper and i want it to be compatible with the original. And i really think that useing close won't be much of a problem because the sub goes in a class so it will be, Class.Close.
For example look at the Recordset(DAO/ADO/RDO?) they all got Recordset.Close so i want that to.
I also tried to Implement the object i need to make it compatible with but i get the following error.
Bad interface for Implements: Interface is derived from another pure interface with non-restricted methods
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|