Accessing member variables of the base class from the derived class.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 1.1.1, 1.1.2
    • Component/s: client-libs
    • None
    • x86
    • windows_95, windows_nt



      Name: rlT66838 Date: 07/15/97


      I am writing a Extended Button class which supports image, tooltip and so on.

      What I need to do is to set the size of the button and some of
      its properties like foreground color, font and so on in my derived class.
      Eventhough my class extends Button class of awt I am not directly
      allowed to access these variables from my Extended Button class
      because these variables have default access 'package'.
      I am forced to call one of the setXXX functions to set these values.
      Why all these attributes of a class are made "package" instead of
      "protected".
      Why the basic attributes which define, in this case,
      the appearance of a class are not directly accessible
      to the derived classes.

      Ragu.


      ======================================================================

            Assignee:
            Michael Martak (Inactive)
            Reporter:
            Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: