Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read plist into CCArray #25

Open
saudahmed opened this issue Apr 5, 2013 · 4 comments
Open

Unable to read plist into CCArray #25

saudahmed opened this issue Apr 5, 2013 · 4 comments

Comments

@saudahmed
Copy link

Reading a plist into the CCArray returns a Null value. After debugging into the code I found out it is unable to read data into the buffer. An asset like .png works perfectly.

the code is simple, it works on other branch.

const char *path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("BatchNode.plist");
CCArray * parray = CCArray::createWithContentsOfFile(path);

// read the file from hardware
hFile = ::CreateFile2(path.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extendedParams);
if (INVALID_HANDLE_VALUE == hFile) {
break;
}

In above code present in CCFileUtils_win8_metro.cpp it returns 0xffffff and breaks so no data is read to the Buffer. So the buffer is never parsed to store data in the CCArray object and thus gets NULL value.

@QiMa
Copy link

QiMa commented Apr 6, 2013

The plist file attribute of content should be true.

@saudahmed
Copy link
Author

Can you please mention where to change the plist file attribute content to true

@QiMa
Copy link

QiMa commented Apr 6, 2013

select the plist file, right click, property,change the content attribute from false to ture.

@mendesbarreto
Copy link

Hi Guys!

I am having a big problem with the .plist, because all my contents is out of project solution it is in the root where the cocos 2d creates the folder of project "Project/Resources" and the solution is in "proj.win32" , So the visual studio does not see the Resources folder and I can’t select the .plist to make the content property becomes true =( . Some Idea how can I proceed?

Thx for all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants