Page 1 of 1

new CEGUI::SchemeManager()

Posted: Thu May 13, 2010 22:47
by jays
Good afternoon,

I'm trying to compile CEGUI and have run into a problem.

This line in my code:

Code: Select all

   CEGUI::SchemeManager::getSingleton().create( "TaharezLook.scheme" );

instantiates a NamedXMLResourceManager:

Code: Select all

   template<typename T, typename U>
   T& NamedXMLResourceManager<T, U>::create( const String& xml_filename,
      const String& resource_group,
      XMLResourceExistsAction action )
   {
      U xml_loader( xml_filename, resource_group );
      return doExistingObjectAction(xml_loader.getObjectName(), &xml_loader.getObject(), action);
   }


The first parameter of the function in the return calls xml_loader.getObjectName()

Which calls the following code:

Code: Select all

   const String& Scheme_xmlHandler::getObjectName() const
   {
      if ( !d_scheme )
         throw InvalidRequestException( "Scheme_xmlHandler::getName: Attempt to access null object." );

      return d_scheme->getName();
   }


Unfortunately d_scheme was never set so I get an assert. It looks like this is only set by elementGUISchemeStart().
It looks like I can't create a scheme because I don't have a scheme...

Any suggestions where I'm going wrong?

Re: new CEGUI::SchemeManager()

Posted: Fri May 14, 2010 08:57
by CrazyEddie
Post the resulting CEGUI.log.

Thanks,

CE.

Re: new CEGUI::SchemeManager()

Posted: Sat May 15, 2010 15:39
by CrazyEddie
I was processing your submitted RapidXML parser, which by the way was missing header files and did not compile cleanly. I decided to soldier on and got over those issues but then had just this same issue, which does not occur with any of the other parsers. This means the issue exists in the RapidXML parser and as such your submission is also rejected ;)

CE.

Re: new CEGUI::SchemeManager()

Posted: Mon May 17, 2010 14:11
by jays
I guess that indicates the xml parser is the problem then. I'll look there.

Re: new CEGUI::SchemeManager()

Posted: Mon May 17, 2010 17:16
by jays
If you want to pursue it further there's a cut and paste error:

This:
// start element
d_handler->elementStart( (utf8*)element->value(), attrs );

Should be this:
// start element
d_handler->elementStart( (utf8*)element->name(), attrs );

Re: new CEGUI::SchemeManager()

Posted: Mon May 17, 2010 18:11
by CrazyEddie
ok, thanks for the information. I'll give it another go in the coming days :)

CE.