Projects > cpp > Issues > Bug #3793

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

GUIReader::widgetFromJsonFile path logic not working on windows

Bug #3793 [Closed]
Asmodehn 2014-01-20 07:44 . Updated about 2 years ago
cocos2d::gui::Widget* GUIReader::widgetFromJsonFile(const char *fileName)

does this ( on version 2.2.2 at least ):

    int pos = jsonpath.find_last_of('/');
    m_strFilePath = jsonpath.substr(0,pos+1);

Which will not work with windows path ( no ‘/’, only ’ )

Asmodehn 2014-01-20 08:45

I had a crash there that seemed to be related to the fact that the GUIreader was not constructed properly.
I was calling the GUIReader constructor as well as the widgetFromJSonFile() member function from another constructor initialization list.
I changed the GUIReader constructor to be constructed at static initialization and everything is fine now. 2014-10-08 02:59

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to

Atom PDF

Start date:2014-01-20
Due date:
% Done:


Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.