Author Topic: How to load xml file?  (Read 698 times)

lqc2001

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
How to load xml file?
« on: August 04, 2005, 08:35:11 am »
I have built a project. Then I want to load some xml file to design several windows.This project is no base on the planeshift. When I do like this: PawsManager  *paws = new PawsManager(object_reg,\"/planeshift/art/apps.zip\").The third  parameter is a default parameter. I do not know how to set the third parameter. I want to know what the third parameter is? And when I load some xml file, how I can load them successful? How can I do?

lqc2001

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
(No subject)
« Reply #1 on: August 04, 2005, 12:31:02 pm »
hi,all
I would like to explain more detail about my problem.
I\'m using paws to make some gui, and I create several xml gui definition file. Now I want to create a independent program to load this xml gui gile, but always I get the error when doing LoadWidget.
In my program, I\'m using WinManager to handle all the gui, and it extends paws\' PawsManager.

like this:
WinManager::WinManager(SPEngine* engine,iObjectRegistry* objectReg,const char* skin)
               :PawsManager(objectReg,skin)
{
   myengine=engine;
    pawsMainWidget *mainWidget;
 mainWidget = new pawsMainWidget(this);
    this->SetMainWidget(mainWidget);
}

void WinManager::Init()
{
 bool result = LoadWidget(\"conf/login.xml\");
   if(!result){
        printf(\"result is false!!!!\");
    }    
}
how can I write an class to load these xml gui files?

Any help will be welcome!

Thanks
lqc

AryHann

  • Veteran
  • *
  • Posts: 1244
  • WonderWoman
    • View Profile
(No subject)
« Reply #2 on: August 18, 2005, 09:04:47 am »
I know I am saying something really trivial, but have you looked already in Planeshift code to see how this part is handled? Maybe something also in CEL could help you.

Have you loaded the file or the dir in VFS somewhere?
AryHann

http://www.reflex.lth.se/culture/annelov - Virtual Annelöv -
Engine Dep. - One of Talad's Angels - Aka ww & Ahrijani's Goddess