Le 12/11/2013 14:22, Tobias Boege a écrit :
> Hi,
>
> I have written a StatusbarForm.class which is a Form with a built-in
> Statusbar. Some people seem to like this sort of thing.
>
> My class hierarchy looks like this:
>
>   - Statusbar.class (a Statusbar)
>   - _StatusbarLabel.class (to manage the contents of a Statusbar)
>   - Form
>      -> StatusbarForm.class (Inherits Form and builds a Statusbar)
>          -> FMain.class (Inherits StatusbarForm)
>
> FMain is an example of a StatusbarForm to run the project.
>
> First question: Is this a good way to specialise the Form class?
> Second question: How do I now edit FMain in the IDE Form editor?
>
> I believe this is possible, as the Report class can do it - I only can't
> find the right charm.
>
> Regards,
> Tobi
>

You should make a StatusBar control instead, that behaves "the good way" 
when put inside a Form (or any other container).

Imagine that someone else add a feature to the Form class the same way: 
you won't be able to use the two features at the same time. So 
inheritance is not the good method for adding new features to the Form 
class.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to