[haiku-commits] Re: haiku: hrev45317 - in src: apps/deskbar preferences/time

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 25 Feb 2013 12:55:29 +0100 (CET)

On February 23, 2013 at 8:50 PM jscipione@xxxxxxxxx wrote:
>   The solution is to override BView's Show(), Hide(), and IsHidden() methods
>   in TimeView to ignore whether or not the window is hidden when considering
> if
>   the clock is hidden.

Methods that override the behavior of standard methods should generally be
avoided -- other users of this class might depend or assume standard behavior
(now and in the future).
Instead, you should introduce new methods that do exactly what you want, and
then use them in those cases.

Additionally, in this particular case: Is there any need to instantiate the time
view if it's not supposed to be visible anyway?

Bye,
   Axel.

Other related posts: