Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 6    Views: 91

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
10/12/12 07:38 AM (13 years ago)

problem with custom config.txt

Okay, I just set up a php script on my website to deliver a custom config.txt to my app. I've run the output through the JSON validator that Buzztouch links to in the control panel, but I'm having problems. After the splash screen fades, the app loads and I can see my icons and labels for each of the 5 tabs I have set up at the bottom of the app. However, the screen is white for the first tab, and it won't let me even select any of the other tabs. I'm not ready to just post all of my config.txt here on the forums for public view, but I'm wondering if anyone can give me an idea of where to look in my code for what might be causing this behavior? Thanks
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
10/12/12 09:19 AM (13 years ago)
This is a tough one, never heard of this method either, you "set up a php script to deliver a custom config.txt"? What was your reasoning for this? (I'm really tired so I might be missing something!) what does it do, what exact "customization" is it doing? Not asking you to give away your secrets, but be as transparent as possible (as buzztouch says). I think a little more info will go a long way! Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/12/12 09:30 AM (13 years ago)
okay, after playing around for a bit and simplifying the json output, I was able to get it working - albeit now I have an app that is half as functional as intended. I still need to figure out the root of the problem so I can get back to full functionality, but I suspect it has to do with the fact that my itemID attributes were at the end of each object rather than the beginning. I'll keep working at it in the days ahead to see if that's true. One other oddity I noticed, though: When I update the cloud reporting to instruct the app to refresh, it goes back to the default config.txt that's in the app. Then I have to update the cloud reporting a second time and refresh the app a second time, so it will go to the data url to get the current config.txt data. Previously I figured it was doing this because there was an error in the server copy of the config.txt, so it was deciding to load the cached copy. But now that I have the server copy working, this problem still exists. Any thoughts?? MrDavid: As to your question about why I would use a php script to deliver config.txt, it's because my website has a series of on/off switches to turn features on or off in the app. The idea is to make this app extendable so I can create similar apps for like-minded organizations, letting them turn on only the features the need.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
10/12/12 09:33 AM (13 years ago)
Chris, awesome sounds like your getting it through! However, why not just do self hosting if you're trying to give them more control over their applications? Sounds like you're trying to recreate the wheel? Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/13/12 08:49 AM (13 years ago)
David, I have a couple of reasons for doing it this way. For one, the app connects to several files on the web server for certain features (through custom URL, html forms, etc). Having the full BT control panel available to org's I extend the app to opens the possibility that they change something and mess the links up, causing their app to break. Second I will be targeting people with little/no programming experience and limited time to devote to app management. Buzztouch works great for people wanting to learn to program apps better (like me), but not so much for people wanting an easy solution to get up and running, hassle free. I'm trying to bridge that gap for a very select market.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/13/12 08:53 AM (13 years ago)
I still would like to know why the app reverts to the config.txt built in on every other refresh. Without a workaround on that, it breaks the whole idea of using an alternate config.txt url.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/13/12 07:32 PM (13 years ago)
figured out this issue as well. I had updated the url for the config.txt in the buzztouch control panel, but had kept the old one (pointing to buzztouch.com) in the new server version! Often the biggest headaches in programming come from the simplest oversights! :)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.