var vname = node.attributes['vname'].nodeValue;
if (this != MIM.im_global)
{
- alert ("getting global var of vname:"+vname);
var vari = get_global_var (vname);
if (vari != null)
this.domain.Defvar (vname, vari.desc, vari.val, vari.range);
MIM.im_domain, null);
};
- function load_im (node)
+ function load_im (node, im)
{
- this.map_list = {};
- this.initial_state = null;
- this.state_list = {};
+ //alert ('Loading IM (' + im + ':' + im.lang + '-' + im.name + ')');
+ im.map_list = {};
+ im.initial_state = null;
+ im.state_list = {};
for (node = node.firstElement (); node; node = node.nextElement ())
{
var name = node.nodeName;
+ //Xex.Log ('parsing ' + name);
var parser = parsers[name];
if (parser)
- parser.call (this, node);
+ parser.call (im, node);
}
- this.load_status = MIM.LoadStatus.Loaded;
+ //alert ('initial state = ' + im.initial_state);
+ im.load_status = MIM.LoadStatus.Loaded;
}
- MIM.IM.prototype.Load = function ()
- {
- this.load_status = MIM.LoadStatus.Loading;
- Xex.Load (MIM.server, this.file, load_im);
- }
+ MIM.IM.prototype = {
+ Load: function ()
+ {
+ this.load_status = MIM.LoadStatus.Loading;
+ Xex.Load (MIM.server, this.file, load_im, this);
+ }
+ };
MIM.IC = function (im, target)
{
MIM.im_global = new MIM.IM ('t', 'nil', 'global', null);
MIM.im_global.load_status = MIM.LoadStatus.Error;
}
- node = undefined;
MIM.current = MIM.imlist['t']['latn-post'];
MIM.current.Load ();
}
if (! ic || ic.im != MIM.current)
{
target.mim_ic = null;
- Xex.Log ('creating IC');
+ Xex.Log ('creating IC for ' + MIM.current.lang + '-' + MIM.current.name);
ic = new MIM.IC (MIM.current, target);
if (ic.im.load_status != MIM.LoadStatus.Loaded)
return true;