PocketTools I wrote these three apps over a year ago, in Spring 1996, but never posted them until now (August 97). I don't claim they as either good or bad programming examples, though they include a few interesting solutions. I'm posting them primarily as examples of what can be done with Steve Weyer's NewtDev programming environment (and solely on the MessagePad 100 under NOS1.3 at that!). With NewtDev, one can program and evaluate Newtonscript on the Newton itself. - "Replacer" is a general purpose find and replace tool. I quickly discovered a need for such a tool, and early on Replacer became an aid in its own development. Replacer is optimized to work with the nested frames of the Notes soup, but it can also search any flat (i.e., unnested frames) alphanumeric soup; it can not read binary objects. Read Replacer's help book (tap the info button) for features. Most of Replacer is built on a single subview to simplify destroying objects (just kill one superobject, poof!) and reduce heap usage when closed. This method may not be kosher practice, but it works, and enabled me to modularize and compile a very large app in the limited heap of a MessagePad 100. The final compilation draws from three precompiled libraries. In all, Replacer comprises almost two thousand lines of source code - all entered by hand with Graffiti. Replacer is also a general purpose tool. Newton's "Find" function, even with NOS2.1, doesn't highlight text found in Notes - a great annoyance, particularly with long notes. Replacer can find that elusive text. - "noButts" is based on Konrad Hinsen's "noButtons" floating toolbar applet. noButtons is a cool tool, and I added features that aid how I work on the Newton, including a pop-up scratchpad for faster writing in long notes on pre MP2K Newtons. noButts is still invaluable to me, and it was the first thing I loaded on my new MP2000. BTW, Konrad's source code for noButtons pushed me to program on the Newton. Though I had played with NewtDev and NTK before, and vaugely appreciated the beauty of Newtonscript, Konrad's coding example was an epiphany. I said, "I can do that!", and quickly had so much fun with NewtDev I paid Steve his shareware fee. I also owe Konrad for introducing me to the GNU General Public License; noButts is dedicated to him. - "Ruler" is a small measuring tool I whipped up to lay out screen views. It's the only one of the three apps that doesn't work correctly under NOS2. I later discovered John Dunning's far better Ruler, so I haven't fixed mine. I've included it as an example of using child views to flip screen orientations without recalculation (as I had naively done at first). Together, I call the three apps "PocketTools." All were written on long commutes (usually while not driving!). Unfortunately, during the last year I've had little time to program, and my commuting habits have changed. I still occasionally work on one continuing project - the killer app, of course! I make no claim for good documentation. To be honest, I haven't looked at the sources since I last compiled them on 960501 (though I still use the apps all the time). Take the code as it is. You might read the comments at the beginning of Replacer, or just wonder in awe how much can be accomplished on six hour commutes! 1997 August 11 Bill Cooper UC Davis bwcooper@ucdavis.edu Slow responses to questions guaranteed. ;-) p.s. The text sources were extracted to a Macintosh, so line terminations are single carriage returns (though I've saved the readme files with DOS-like crlf's). If you live with a DOS or *NIX box and your text editor doesn't convert properly and you don't know how to replace characters globally, contact me for modified sources.