#212 Add method to retrieve immediate superclass of a class.

v3.2.0
closed
Classes (154)
5
2012-08-14
2007-07-19
No

Class objects have a superclasses method that will retrieve all of the superclasses of the class. However, it is frequently useful to retrieve just the single superclass element without needing to worry about the
inherited mixins as well.

Discussion

  • Rick McGuire

    Rick McGuire - 2007-07-19

    Logged In: YES
    user_id=1125291
    Originator: YES

    Committed revision 606.

     
  • Rick McGuire

    Rick McGuire - 2007-07-19

    Logged In: YES
    user_id=1125291
    Originator: YES

    Here's the doc update.

    superClass <indexterm><primary>superClass method</primary> <secondary>of Class class</secondary></indexterm> <indexterm><primary>method</primary> <secondary>superClass method</secondary> <tertiary>of Class class</tertiary></indexterm> <programlisting> >-superClass------------------------------------------------>< ]]> </programlisting> <para>Returns the immediate superclass of the receiver class. The immediate superclass is the original class used on a <emphasis role="bold">subClass</emphasis> or a <emphasis role="bold">mixinClass</emphasis> method. For the Object class, <emphasis role="bold">superClass</emphasis> returns .nil. <para><emphasis role="bold">Example:</emphasis></para> <indexterm><primary>examples</primary> <secondary>superClass method</secondary></indexterm> <programlisting> say .object~superclass -- displays "The NIL object" say .class~superclass -- displays "The Object class" say .set~superclass -- displays "The Table class" </programlisting>
     
  • David Ashley

    David Ashley - 2007-07-19

    Logged In: YES
    user_id=931756
    Originator: NO

    Docs updated in revision 607.

     


Anonymous

Cancel  Add attachments