Disko Forum logo Login  |  Register  |  Lost Password
Re:Problem with MMSDialogManager::loadChildDialog()

andre
Posts: 35
graphgraph

Problem with MMSDialogManager::loadChildDialog() 4 Years, 11 Months ago  
Hello,

I am having a problem using the MMSDialogManager.loadChildDialog() member function.

Here is what I am doing:

(...)
MMSDialogManager dm;
MMSChildWindow *movie_desc_window = dm.loadChildDialog("movie_desc.xml";
(...)

But the program aborts at this point with the following error message:

terminate called after throwing an instance of 'MMSDialogManagerError*'
Aborted

Moreover, the logfile does not report any problem.

I have attached the my dialog file to this message. /home/andre/disko/tests-andre/menu-test-4/movie_desc.xml [/file]

So my question is: How can I know exactly what caused the program to abort? Is there any way to access the DialogManager errors?

Thanks in advance,
André Mendes
 
  The administrator has disabled public write access.
Re:Problem with MMSDialogManager::loadChildDialog()

andre
Posts: 35
graphgraph

Re:Problem with MMSDialogManager::loadChildDialog() 4 Years, 11 Months ago  
Problems attaching the file. Trying again:

File Attachment:
File Name: movie_desc.txt
File Size: 760
/home/andre/disko/tests-andre/menu-test-4/movie_desc.xml.txt [/file]
 
  The administrator has disabled public write access.
Re:Problem with MMSDialogManager::loadChildDialog()

Stefan
Posts: 91
graph

Re:Problem with MMSDialogManager::loadChildDialog() 4 Years, 11 Months ago  
Hi Andre,

unfortunately the file upload did not work but some hints anyway:

If there is any xml syntax error while loading the file, you will most likely see some error output from libxml2 on stdout. If there is no output the syntax is certainly correct. To catch the DialogManager error a simple try / cat block is sufficient:

QUOTE:
mmsInit(MMSINIT_EVENTS|MMSINIT_GRAPHICS|MMSINIT_INPUTS|
MMSINIT_THEMEMANAGER|MMSINIT_WINDOWMANAGER|
MMSINIT_WINDOWS,
argc, argv, diskorc,"Testprog", "BerLinux");

MMSDialogManager dm;

try {
MMSWindow *my = dm.loadDialog("./dialog.xml");
my->show();
} catch(MMSError *e) {
cout << e->getMessage() << endl;
}


That should bring some light into the issue. Could you tell us Which message you get?

have fun && happy new year
Stefan
 
  The administrator has disabled public write access.
Re:Problem with MMSDialogManager::loadChildDialog()

Stefan
Posts: 91
graph

Re:Problem with MMSDialogManager::loadChildDialog() 4 Years, 11 Months ago  
Hi André,

my fault. I could download your file, and saw no explicit error. Most likely you forgot a surrounding MainWindow. The concept behind this is to have free placeable and show/hideable ChildWindows within a MainWindow. The loadChildDialog() method is used to load child windows from seperate dialog files into an existing dialog which was previously loaded by the loadDialog() method. You cannot create Childwindows existing on their own.

Hope that Helps
Stefan
 
  The administrator has disabled public write access.
Re:Problem with MMSDialogManager::loadChildDialog()

andre
Posts: 35
graphgraph

Re:Problem with MMSDialogManager::loadChildDialog() 4 Years, 11 Months ago  
Hello Stefan,

Thank you very much for your help.

The catch (MMSError *e) is indeed a very useful feature. I would like to suggest that you guys add it to the online documentation.

Regarding the dm.loadChildWindow() I would like to clarify some ideas:

- In my application, I had previously created a main window using new MMSMainWindow(...), but not a dialog manager. So, if I understand correctly, this does not work because the main window needed to be create through dialog manager as well, correct?

- In order to load a main window and then one (or more) child windows using loadChildWindow(), I must use the same dialog manager instance, right?

Please note that these constrains are not very clear in the tutorials. So once again I would kindly suggest that you add some more detail to the online documentation.

Please let me know your thoughts.

Many thanks,
André
 
  The administrator has disabled public write access.
Powered by FireBoard
get the latest posts directly to your desktop