Apparently the blog importer I was using is no longer supported by Facebook, so hopefully this one (NetworkedBlogs) will work. I decided to play around with the layout theme, and added a photo I took of the beautiful Flint Hills area around Emporia, Kansas.
Well, I started out the week attempting to update the rxkinetics.net web app. My plan is to add the ability to change and save settings and pk models, using the localStorage functionality in HTML5. But, localStorage is via JavaScript on the client side (web browser), whereas the web app is ASP.NET server side. And neither the twain shall meet.
Since this is a working site, I had to copy the abpk.aspx to a test page. Then I added a settings page for changing creatinine clearance options, and attempted to save and retrieve the settings and populate the screen.
I wanted to use JSON, because that is what I will need to use when I add local pk model storage. But, after screwing around with JSON for a day and failing, I gave up and put each setting into its’ own row.
Since I’m working in Visual studio 2005, there is no native support for JavaScript, no Intellisense, no syntax checking, no real time debugging. Just blind coding followed
by trial and error. The only debugging I could do was to put alerts at various points within the JavaScript to display the progress.
Then I had no idea where to put the JavaScript, and when to trigger it. Putting the code in head element and triggering the JavaScript on the page onload event did nothing because the page isn’t fully rendered yet. Placing the script in the body “sort of” worked, but the CheckBox.checked value didn’t change. I ended up adding some hidden elements to store the settings so the server side app could read them.
It took three days of beating my head against the wall to figure out this trivial stuff. So, having had enough of this frustration, I switched to working on the Nook Color version of the Android app.
The first problem I ran into was error after unexplained error in Eclipse. It kept showing errors from google tools, which aren’t even used in this app. I eventually figured out that these were red herrings, the real problem was the target platform was not set.
Next problem was the layout editor throwing an XML error on some of the layouts, for no reason whatsoever. Eventually discovered that this is a known bug in the Android layout editor.
Finally I was able to run the app in the emulator, but, as any developer knows there is no substitute for debugging the app on the actual target device.
And that’s when the real nightmare began.
B&N has the Nook Color totally locked down. It will not allow installation of “non-market” apps. Nor does it allow connection to the Android Debug Bridge, and there is no Development setting on the Nook as there is on a standard Android device.
I tried following the cryptic instructions on the Nook developer site to allow ADB access, to no avail.
Then I tried various methods from the internet to soft root it. One suggestion was to attempt to crash the browser by going to certain web site. It said to try it up to twelve times. Good grief, once upon a time google was useful for finding information, now it only brings up page after page of irrelevant useless crap.
Eventually I resorted to rooting the Nook, and, after uninstalling and reinstalling the ADB USB driver umpteen times, I was finally able to connect the Nook to Eclipse and debug the app. I started this at 5 AM and finally, at noon, got the app to run on the Nook.
Since I had copied the layouts from the Android phone version, I’ll need to change all of them, increasing the size and color of all the elements. But at least I can see some light at the end of the tunnel.
As for the web app, I’ll have to mull it over, my brain is just too tired now. I think I’m getting too old for all this switching between languages, my mind is not as agile as it used to be.
Misery