self remember: [:dont| forget to: super initialize]

It’s happening to me over and over again, and every time I tend to panic it’s related to VASTs not-yet-existing support of Continuations. But it’s just me forgetting the same little thing over and over again.

What’s happened? I had a set of components that used to work just fine. Today I had to add an instance variable to some of my WAComponent subclasses to add new behaviour to them. When I wanted to test them, I got:

MessageNotUnderstood: contents

The problem is that somethings wrong with the decoration instance variable in the component. It’s nil, but should be something else (A WAValueHolder at least).

The  solution is simple: Whenever you implement initialize in a Seaside component, don’t forget to call super initialize. If that happens to you, be assured, it’s a common problem, mostly for newbies and eldering men 😉

filed under: stupid nasty self-introduced bugs



One thought on “self remember: [:dont| forget to: super initialize]

  1. And also important: that’s only on *instance side*. Never call “super initialize” on *class side*, because each class is initialized as it is loaded from MC or filein!

Comments are closed.