title: Basic Smalltalk Subclass
body: <p>I am trying to create an extremely simple Vector class as a subclass of Array in Smalltalk. My code to create the class looks like this:</p>
  
  <pre><code>Array subclass: #Vector
  Vector comment: 'I represent a Vector of integers'
  
  Vector class extend [
  new [
      | r |
      &lt;category: 'instance creation'&gt;
      r := super new.
      r init.
      ^r 
      ]
   ]
  
  Vector extend [
  init [
      &lt;category: 'initialization'&gt;
      ]
   ]
  </code></pre>
  
  <p>Obviously I haven't written any methods yet, but I'm just trying to get this part working first. After the class is created as above, if I type:
      v := Vector new: 4
  I get error:</p>
  
  <pre><code>Object: Vector error: should not be implemented in this class, use #new instead
  SystemExceptions.WrongMessageSent(Exception)&gt;&gt;signal (ExcHandling.st:254)
  SystemExceptions.WrongMessageSent class&gt;&gt;signalOn:useInstead: (SysExcept.st:1219)
  Vector class(Behavior)&gt;&gt;new: (Builtins.st:70)
  UndefinedObject&gt;&gt;executeStatements (a String:1)
  nil
  </code></pre>
  
  <p>I had assumed that since it is a subclass of Array, I could create a Vector in this manner. What is the best way to go about doing this? Thanks!</p>
  
  <p>Edit -- I figured it out. After reading deeper into the tutorial, I found I needed to include &lt;shape: #pointer&gt; </p>