Search code examples
webpharoaida

Aida tutorial is unclear


I am working on the Aida tutorial:

http://www.aidaweb.si/tutorial

but I got stuck on the end of the second section:

In a workplace make an instance of ADemoAddressBook and fill it with a few example ADemoAddresses:

Should I add an Instance variable? I don't understand what to do in that if someone can be more clear and explain it to me? I will really appreciate it.


Solution

  • No, you don't have to create Instance variable (or better object), because this class probably doesn't exist.


    By Wikipedia instance OF the class (not instance class) is:

    a specific realization of any object. Formally, "instance" is synonymous with "object" as they are each a particular value (realization), and these may be called an instance object;

    To make that more clear, please take a look on this picture:

    enter image description here

    "Car" is class and "polo", "mini" and "beetle" are car-type objects = so they are instances of class "car".


    Coming back to SmallTalk: How to create instance of one of the classes? That is simple. You just need to use new or basicNew operator. More you can read there:

    https://code.google.com/p/seaside/wiki/ObjectInitialization

    http://esug.org/data/Articles/Columns/EwingPapers/class_initialize.pdf