mcongrove / ChariTi

Please do not use: this is out-dated
Other
113 stars 85 forks source link

Add TiShadow Support #224

Open joshjensen opened 10 years ago

joshjensen commented 10 years ago

Currently ChariTi does not like TiShadow

timppa commented 10 years ago

Any idea why?

I've added the modules into my custom tishadowapp, and updated it's tiapp.xml to include them.

What am I missing?

joshjensen commented 10 years ago

I found that it has to do with where TiShadow stores the app data. So in the controllers/index.js file I added:

Ti.App.Properties.setString("resourcesDirectory", Ti.Filesystem.resourcesDirectory);

if(Ti.App.name === "TiShadow") {
    Ti.App.Properties.setString("resourcesDirectory", Ti.Filesystem.resourcesDirectory + Ti.Platform.osname + "/");
}

Then throughout the app when I need to call the resource directory instead of using "Ti.Filesystem.resourcesDirectory" I use "Ti.App.Properties.getString("resourcesDirectory")"

Probably not the most elegant, but it works.

dbankier commented 10 years ago

@joshjensen, all fixed now in master

dbankier commented 10 years ago

nice app, by the way!

mcongrove commented 10 years ago

Thanks @dbankier !

joshjensen commented 10 years ago

Yes, thank you and thanks for taking care of the ticket.

mcongrove commented 10 years ago

@joshjensen Is this fixed now with @dbankier 's commit to TiShadow?

joshjensen commented 10 years ago

@mcongrove As far as I know. I have not tested it yet.