Io Programming/Pitfalls

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

[edit] Subtle Io pitfalls

Object initialization:

A := Object clone do(
 ...
 init := method(
  ...
 )
)

Now, you can use the A object, but the A object is not yet initialized (by the init method). The init method is only called when the A object is cloned. This can for instance "bite" you if you implement your own clone method for an object.