radioAe6rt

Archive for August, 2008

Support Barack Obama

without comments

I’ve made a few financial contributions to the Obama campaign, which is the most important run for the presidency in my lifetime. Be a part of our own redemption as a nation — help elect this man the next President of the United States with not only your vote, but with a small contribution to the campaign.

Written by radioae6rt

August 17th, 2008 at 3:48 pm

Posted in Internet, Music

Regex on the iPhone

without comments

John Engelhart wrote a nice piece of code, RegexKitLite, that allows regex programming on the iPhone. RegexKitLite is part of his larger RegexKit project.

There is something funky about how the simulator and device SDKs work with respect to how this code pulls in header files, however. I had to insert an #ifdef as a hack to get the code to work on a real iPhone device. The code works as-is if running in the simulator. Here is the mod, to RegexKitLite.m:

#ifdef iPhone
  else { if((splitStrings = rkl_realloc(&scratchBuffer[1], splitStringsSize, (NSUInteger)1)) == NULL) { goto exitNow; } }
#else
  else { if((splitStrings = rkl_realloc(&scratchBuffer[1], splitStringsSize, (NSUInteger)NSScannedOption)) == NULL) { goto exitNow; } }
#endif

near the original line 579.

October 21, 2008 update John Engelhart sent me a note indicating that v2.2 of RegexKitLite is available, and that this version probably doesn’t need this #ifdef. He was right: I tested my original simple test code against v2.2, and it seems to work fine. Thanks, John.

Written by radioae6rt

August 16th, 2008 at 8:36 am

Posted in Internet

UI programming on the iPhone

without comments

Some good links on programming view controllers and table views on the iPhone.

Written by radioae6rt

August 12th, 2008 at 9:27 am

Posted in Internet