This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Overloaded vs variable?


Hi,

In my ongoing effort to cleanup managedwin, I've noticed a trend to do 
things like:

Class ManagedWin {

   public method something {} { return 1 }

   public method frob {} {
     if {[something]} {
       _frob_it
     }
 }

Class MyWin {
  inherit ManagedWin

  public method something {} { return 0 }

}

This is supposed to dictate to ManagedWin not to frob MyWin. Question 
is: Why is this any better than just using a protected variable? It 
would seem to me to be a lot cleaner...

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]