In Xen 2.0 alpha tutorial 26, error occured.

Aug 28, 2010 at 4:04 AM

Hi.

Tutorial 26 Game State and Threading in Xen 2.0 alpha, as WinForms host mode, error occured.

this is error message.

--------------------------------------------------------------------------

in Content.cs

71 : public ContentRegister(Application application) : this(application,((Game)application).Content.RootDirectory)

NullReferenceException.

--------------------------------------------------------------------------

 and My level editor with Xen WinForm host, same error occured at create ContentRegister class instance.

is this bug?

Coordinator
Sep 4, 2010 at 9:12 PM

Hi.

Sorry about the very slow reply, I hope you have managed to find a work around.

This is certainly a bug, and it's actually pretty easy to get around. Just remove the (Game) cast. So change ((Game)application).Content to application.Contet. There is a similar line '((Game)application).Services' to 'application.Services'.

Please note though, I haven't been able to get the win'forms mode working with full XNA 4 beta yet. :-(

Sep 4, 2010 at 11:40 PM

thanks for your answer. and Congratulations for your new job.