Hi Vicente,

   ::Super:Destructor()

Ron

--------------------------------------------------
From: "Vicente Guerra" <v...@guerra.com.mx>
Sent: Friday, February 03, 2012 12:00 PM
To: "xHarbour-Developers List" <xharbour-developers@lists.sourceforge.net>
Subject: [xHarbour-developers] Subclassing DESTRUCTOR

> Hi!
>
> Is it possible to call a ::Super:Destructor()
> method? I want to extend a class, but I need
> to extend DESTRUCTOR too.
>
> Thanks in advance.
>
> Atte.
>  Vic
>
> PROCEDURE MAIN
> LOCAL x
>    ? "Creating object..."
>    x := MyClass2():New()
>    ? "Destroying..."
>    x := nil
>    ? "End"
> RETURN
>
> #include "hbclass.ch"
>
> CLASS MyClass
>    METHOD NEW
>    DESTRUCTOR End
> ENDCLASS
>
> METHOD New() CLASS MyClass
>    ? "... Creating!"
> RETURN Self
>
> PROCEDURE End() CLASS MyClass
>    ? "... Destroying!"
> RETURN nil
>
> CLASS MyClass2 FROM MyClass
>    DESTRUCTOR End2
> ENDCLASS
>
> PROCEDURE End2() CLASS MyClass2
>    ? "... Destroying 2!"
>    // Here I need to call ::Super:Destructor(),
>    // but it fails.
>    ::Super:End()
> RETURN nil
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to