new CEGUI::SchemeManager()

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

new CEGUI::SchemeManager()

Postby jays » Thu May 13, 2010 22:47

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?
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: new CEGUI::SchemeManager()

Postby CrazyEddie » Fri May 14, 2010 08:57

Post the resulting CEGUI.log.

Thanks,

CE.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: new CEGUI::SchemeManager()

Postby CrazyEddie » Sat May 15, 2010 15:39

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.

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: new CEGUI::SchemeManager()

Postby jays » Mon May 17, 2010 14:11

I guess that indicates the xml parser is the problem then. I'll look there.
-- Doctor Doctor, it hurts when I ....

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: new CEGUI::SchemeManager()

Postby jays » Mon May 17, 2010 17:16

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 );
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: new CEGUI::SchemeManager()

Postby CrazyEddie » Mon May 17, 2010 18:11

ok, thanks for the information. I'll give it another go in the coming days :)

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests