Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You may have "Class" and "Instance" confused. It's not clear from your example, so I'll presume that you're using a lot of class definitions and don't have appropriate object instances of those classes.</p> <p>Classes don't really have usable attribute values. A class is just a common set of definitions for a collection of objects. You should think of of classes as definitions, not actual things.</p> <p>Instances of classes, "objects", are actual things that have actual attribute values and execute method functions.</p> <p>You don't pass variables among <em>classes</em>. You pass variables among <em>instances</em>. As a practical matter only instance variables matter. [Yes, there are class variables, but they're a fairly specialized and often confusing thing, best avoided.]</p> <p>When you create an object (an instance of a class)</p> <pre><code>b= BasicInfoPage(...) </code></pre> <p>Then <code>b.intelligence</code> is the value of intelligence for the <code>b</code> instance of <code>BasicInfoPage</code>.</p> <p>A really common thing is </p> <pre><code>class MOS( wx.wizard.PageSimple ): def __init__( self, parent, title, basicInfoPage ): &lt;snip&gt; self.basicInfo= basicInfoPage </code></pre> <p>Now, within MOS methods, you can say <code>self.basicInfo.intelligence</code> because MOS has an object that's a BasicInfoPage available to it.</p> <p>When you build MOS, you provide it with the instance of BasicInfoPage that it's supposed to use.</p> <pre><code>someBasicInfoPage= BasicInfoPage( ... ) m= MOS( ..., someBasicInfoPage ) </code></pre> <p>Now, the object <code>m</code> can examine <code>someBasicInfoPage.intelligence</code> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload