PlaneShift

Development => Development Deliberation => Topic started by: lqc2001 on August 04, 2005, 08:35:11 am

Title: How to load xml file?
Post by: lqc2001 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?
Title:
Post by: lqc2001 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
Title:
Post by: AryHann 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?