Posts tagged: javascript

The Value of Documentation

Having been reared as a developer in Microsoft’s cozy little .NET world, I didn’t really appreciate the value of quality documentation until I ventured out into the wild jungle.

I’ve been using Appcelerator’s Titanium Mobile SDK for the past few months. It’s kind of become my Shere Khan here in the jungle. Theoretically, using Titanium Mobile is easier and faster than writing native code. This might be true if I didn’t waste so much time deciphering their documentation.

I made a button to toggle my table view’s editable status. The object had a property called editable, so that seemed to be what I wanted. After testing, however, all this did was toggle whether or not swipe-to-delete worked. What I really wanted was the little red minus sign to appear, and have the contents of each row shifted to the right to make room. After 30 minutes of trial and error, looking through TableViewRow properties, and searching their Q&A section (because Appcelerator has no official forums) I found that TableView actually has two properties: editable and editing.

 

image

 

Even after discovering this other property, I still had to actually test each one to see what they did. Apparently, “editable” toggles the swipe-to-delete, whereas “editing” toggles the minus-button-on-the-left thing. The two are independent of each other.

Thanks for saving me time, web based application framework!

Signed,

Bitter in Bossier