JS Warning for Read Only attribute
Hey guys,
this line:
parent = Ti.Filesystem.getresourcesDirectory();
produces this error:
[WARN] JavaScript compiler reported "Read only." at app.js:18
Why? It's more of an annoyance because my app is working fine, but I'd really like to know why and how to fix it.
Any ideas? Thx!
2 Answers
-
maybe should be
parent = Ti.Filesystem.resourcesDirectory();
or
parent = Ti.Filesystem.getResourcesDirectory();
( capital R) ?
-
Thanks Tamas, changing the r to R didn't work but it got me thinking and I changed my variable name. Apparently my 'parent' variable was conflicting with a lower-level Ti variable. As soon as I renamed my var the warning went away.
Much thanks