|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB6 don't see events of the implemented interfaceI have an interface class like Interface_1 with event and methods like event1,event2 , M1() , M2 If I implemet this interface in other calss like myClass ; I can implement the mothods M1() , M2() only but cannot raise the events event1,event2 Any advice .. ***************************************************************** **************************check code below ************************ ***************************************************************** ' ---------------------------- Interface_1.cls '----------------------------- Public Event event1() Public Event event2() Public Function M1() End Function Public Function M2() End Function '----------------------------------------------- MyClass.cls '----------------------------------------------- Option Explicit Implements Interface_1 Private Sub Class_Initialize() End Sub Private Sub Class_Terminate() End Sub Private Function Interface_1_M1() As Variant End Function Private Function Interface_1_M2() As Variant End Function '-------------------------------------------- -- Essam Salah Senior Developer MTSE "Essam Salah" <mt***@link.net> wrote in message Events aren't part of the interface, just add them to your classesnews:%239y$KOtXFHA.2288@TK2MSFTNGP14.phx.gbl > Dear All > > I have an interface class like Interface_1 with event and methods like > event1,event2 , M1() , M2 > > If I implemet this interface in other calss like myClass ; I can > implement the mothods M1() , M2() only but cannot raise the events > event1,event2 Also, please trim the crosspost if you reply. Of the groups you included only m.p.vb.general.discussion is appropriate for this question. -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.com> wrote in message I noticed the other day that the events are parts of the interface in news:u9jWpytXFHA.3840@tk2msftngp13.phx.gbl... > Events aren't part of the interface, just add them to your classes vb.net/c#. Michael [irrelevant groups snipped]
> I noticed the other day that the events are parts of the interface in AFAIK this is because events are implemented in a different way (via delegates) in these languages. IMO events _should_> vb.net/c#. be part of interfaces but this was not the case in VB6 unfortunately. FWIW, Mike - Microsoft Visual Basic MVP - E-Mail: ED***@mvps.org WWW: Http://EDais.mvps.org/ "Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message Could be; neither of those languages is VB though.news:epWhT5xXFHA.796@TK2MSFTNGP10.phx.gbl > "Bob Butler" <tiredofit@nospam.com> wrote in message > news:u9jWpytXFHA.3840@tk2msftngp13.phx.gbl... >> Events aren't part of the interface, just add them to your classes > > I noticed the other day that the events are parts of the interface in > vb.net/c#. -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.com> wrote in message Could be, it doesn't have most of the faults of VB.news:uhFvY9yXFHA.3164@TK2MSFTNGP12.phx.gbl... > Could be; neither of those languages is VB though. Michael "Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message Troll, troll, troll your boat....news:O0KLKczXFHA.2076@TK2MSFTNGP15.phx.gbl... >> Could be; neither of those languages is VB though. > > Could be, it doesn't have most of the faults of VB. "Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message Sorry, couldn't help myself. :-)news:uF%23htI0XFHA.2884@tk2msftngp13.phx.gbl... >> Could be, it doesn't have most of the faults of VB. > > Troll, troll, troll your boat.... Michael "Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message All languages have their faults and limitations. It's a real shame becausenews:O0KLKczXFHA.2076@TK2MSFTNGP15.phx.gbl > "Bob Butler" <tiredofit@nospam.com> wrote in message > news:uhFvY9yXFHA.3164@TK2MSFTNGP12.phx.gbl... >> Could be; neither of those languages is VB though. > > Could be, it doesn't have most of the faults of VB. the core VB language could have been extended and many of the "faults" repaired without discarding the baby with the bath water. -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.com> wrote in message Have you used .net much? Originally I would have agreed with you but after news:e36Fq65XFHA.3572@TK2MSFTNGP12.phx.gbl... > All languages have their faults and limitations. It's a real shame > because > the core VB language could have been extended and many of the "faults" > repaired without discarding the baby with the bath water. using it a while I understand why they had to start over. Michael "Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message I have used it, although I abandoned VB.Net as a joke early on and what Inews:elUlFE%23XFHA.3620@TK2MSFTNGP09.phx.gbl > "Bob Butler" <tiredofit@nospam.com> wrote in message > news:e36Fq65XFHA.3572@TK2MSFTNGP12.phx.gbl... >> All languages have their faults and limitations. It's a real shame >> because >> the core VB language could have been extended and many of the >> "faults" repaired without discarding the baby with the bath water. > > Have you used .net much? Originally I would have agreed with you but > after using it a while I understand why they had to start over. have done has been using C#. I do not mean that they had to stay with the COM platform. I mean that they should have done everything possible to retain as much source-level compatibility with the language as possible. VB did *not* have to be trashed in order to extend it. -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.com> wrote in message Same here, although I didn't think vb.net was a joke, I just thought it news:uInGwl%23XFHA.228@TK2MSFTNGP12.phx.gbl... > I have used it, although I abandoned VB.Net as a joke early on and what I > have done has been using C#. would be better to go with C#. I was suprised what a non event switching was. > I do not mean that they had to stay with the COM platform. I mean that I partly agree but partly don't. I think some sort of radical change was > they > should have done everything possible to retain as much source-level > compatibility with the language as possible. VB did *not* have to be > trashed in order to extend it. needed but they should have made a better upgrade path. In what you wrote i would remove the words "everything possible" and replaced it with "a lot more". I think if they did everything possible there would be too many compromises. Michael "Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message Just another "noble defender" eh?news:e2y9sN$XFHA.2572@TK2MSFTNGP14.phx.gbl... > "Bob Butler" <tiredofit@nospam.com> wrote in message > news:uInGwl%23XFHA.228@TK2MSFTNGP12.phx.gbl... >> I have used it, although I abandoned VB.Net as a joke early on and what I >> have done has been using C#. > > Same here, although I didn't think vb.net was a joke, I just thought it > would be better to go with C#. I was suprised what a non event switching > was. The Slow Brain Death of VB.NET "VB.NET is so awesome of an upgrade, in fact, that these noble defenders of the faith chose not to use it." http://www.codinghorror.com/blog/archives/000235.html -- Ken Halter - MS-MVP-VB - http://www.vbsight.com Sign up now to help keep VB support alive - http://classicvb.org/petition Please keep all discussions in the groups.. "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message HTTP Error 404 - File or directory not found.news:%23MnFI9$XFHA.4032@tk2msftngp13.phx.gbl... > The Slow Brain Death of VB.NET > "VB.NET is so awesome of an upgrade, in fact, that these noble defenders > of > the faith chose not to use it." > http://www.codinghorror.com/blog/archives/000235.html Michael If you copy the link text into your address bar, it works fine. It was a
typo in the actual link. Instead of sending you to www.codinghorror.com/blog/... , it instead pointed you to www.codinghorror.com/bl-og/... I've notified Mr. Halter about his error and hopefully he will fix it in future posts. Chris Lieb Show quoteHide quote "Michael C" wrote: > "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message > news:%23MnFI9$XFHA.4032@tk2msftngp13.phx.gbl... > > The Slow Brain Death of VB.NET > > "VB.NET is so awesome of an upgrade, in fact, that these noble defenders > > of > > the faith chose not to use it." > > http://www.codinghorror.com/blÂog/archives/000235.html > > HTTP Error 404 - File or directory not found. > > Michael > > > |
|||||||||||||||||||||||