android - Minko - getElementById causes runtime exception to be thrown: TypeError: Minko.tmpElement is null -
i using minko , html-overlay feature. in overlay onload()->connect() method have following statements:
...
gameinterfacedom = dom; but1 = gameinterfacedom->getelementbyid("id_but1"); //trouble here ! but2 = gameinterfacedom->getelementbyid("id_but2"); log_info("going bind onclick events..."); if( but1 != nullptr ) { onbut1 = but1->onclick()->connect( [](dom::abstractdommouseevent::ptr event) { // something... log_info("clicked button 1"); }); } if( but2 != nullptr ) { onbut2 = but2->onclick()->connect( [](dom::abstractdommouseevent::ptr event) { // something... log_info("clicked button 2"); }); }
...
compiling , running under linux64 works if loaded html not contain but1 , but2 ids, however, same code crashes android , web / html5 (if expected ids not found) following error :
exception thrown: typeerror: minko.tmpelement null
is there workaround such case, or mandatory have expected ids in c++ defined in html ?
thx.
Comments
Post a Comment