Did yuo add it to the code in http://ooo.pastebin.ca/2357487? No, I didn't. I added it in my main code.
Thank you for that you told me in the above mail. I get it, but I got this error because I didn't add the correct name of object, in your code it is called xDoc, I just had to change xcomponent to xDoc. It was a problem of inheritance.