paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] virtual method call


From: Andrew Ford
Subject: Re: [paragui-users] virtual method call
Date: Mon, 22 Jul 2002 11:00:46 -0700 (PDT)

Are you by any chance passing in a CDialog reference
and not a pointer?

Andrew

--- taurus <address@hidden> wrote:
> Hello People,
> 
>       I`ve got a little problem, maybe someone knows
> how to solve it.
>       I`ve created a new class CDialog from
> PG_Window.
>       In CDialog I`ve added a virtual method Valid()
> to check if I can
>       close dialog window.
> 
>       /*/*/*/*/*/*/
>       class CDialog : public PG_Window
>       {
>       public:
>       ...
>       virtual bool Valid() {return true;};
>       ...
>       }
>       /*/*/*/*/*/*/
> 
>       Then I create a new class CProgressDialog from
> CDialog:
>       /*/*/*/*/*/*/
>       class CProgressDialog : public CDialog
>       {
>       public:
>       ...
>       bool Valid() {return !IsSomthingEmpty()};
>       ...
>       }
>       /*/*/*/*/*/*/
>       
>       But, at runtime, it will be called
> CDialog::Valid() from
>       CProgressDialog... :(
> 
>       Why does it call CDialog::Valid() instead of
>       CProgressDialog::Valid ?!!
> 
>       Thank you!
>       
> Kind regards,
>        taurus                          
> 
> address@hidden
> 
>  ->> "If you will have a megaphone, you will never
> have to be alone..."
> 
> 
> 
> _______________________________________________
> paragui-users mailing list
> address@hidden
>
http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]