Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
how to get the vm to realize an .xos file is corrupt or is filled with the wrong information, is empty, etc:
fun cbProjectLoaded(project, p)=
//see if is has a 'scene' xml node. I guess other xml files have a node named 'scene' in them, but they probably don't have the .xos extension...
let XMLgetMarkByValue project.PRJ_xmlFile "scene" -> xmlfile_evaluate in
( if xmlfile_evaluate == nil then
(
_DLGMessageBox _channel mainWindow.EDW_win "corrupte" "corrupt" 0;
0;
)
else
(
_fooS "projected has been loaded, triggering plugloaded callback";
_rfltimer _starttimer _channel 100 @cbPlugLoaded p;
0;
);
);
0;;
Last edited by hebdemnobad (7-Nov-2014 20:32:00)
Offline
a shorter way to put the question...
how can scol query the variable loadedProject to see whether it is a valid os3d .xos file?
or
how can the vm display to the user what the log says:
XMLPARSER WARNING : the XML content contain an error and will be loaded manually
//this is the path of the fake project:
krono3 lexiviewlocal/bib.xos
Last edited by hebdemnobad (7-Nov-2014 20:21:30)
Offline
Yes when the XML standard is not respected or if the file contains an error (incomplete, or badformated) the xmltools try to parse it anyway.
This is because at the beginning I forgot to manage xml marks or parameter names started with numbers. So it was working for XOS files but it was not standard so it will fail with the tinyXml loader.
Offline