Learn Adobe AIR, Part II. Difficulties

Hello all
I’m having trouble with this lesson. Mainly this part:
createWindow.addEventListener(air.Event.COMPLETE, passDb);

Granted, I have implemented this in a different project but I was extremely careful when adding it so that the whole thing would work. Anyway, my problem is that I get:
“TypeError: Value undefined does not allow function calls. at passDb(event)” when I try to call a function inside (event.target.window.receiveDb(db):wink:
The insanely weird part is that the line before that contains “event.target.window.printSomething();”, it’s a function that just alerts “alert”, and this printSomething() function actually fires somehow.
My only observation is that it has something to do with passing variables. Which is weird.
This is my only problem. When I somehow fix this my application will be complete. It’s really annoying.

Any help is appreciated.