Friday, November 29, 2013

Making Thor Even More Useful

I’ve been using Thor since day one. In case you haven’t heard of it, Thor is the most crazily–useful tool ever invented for VFP developers. Created by a few developers (mostly Jim Nelson) and available as a VFPX project, Thor is described as “a tool for managing add-on tools in the IDE, managing menus and hot key assignments for IDE Tools.” While that’s true, it’s the wide array of add-ons for Thor that makes it the incredible productivity booster it is.

One tool I use a dozen times a day is one originally created by Andy Kramek and Marcia Akins that adds a variable name to the LOCAL statement if it isn’t already there. The cool thing about this tool is that it picks up the variable name from the text where the cursor is located. So, I can type something like “lcMyVariable”, hit Alt-6 (the hotkey I assigned to the tool in Thor), and voila: lcMyVariable is added to the LOCAL statement. No more scrolling to the top of the code, manually adding the variable name, then scrolling back down to where I was (or more likely, forgetting to add it to LOCAL so now it’s a PRIVATE variable by default). Even more interesting is that Andy and Marcia didn’t create this tool for Thor. Instead, I simply took their code and added a little wrapper to it so it’s now a Thor tool.

One tool I knew Thor has had for a while is called Create LOCALs. It’s similar to Andy and Marcia’s tool except it goes through an entire block of code, finds all variables, and adds them all to the LOCAL statement. I thought this would be a cool tool but when I tried it, one thing it did was a deal-breaker for me: it sorts the variables alphabetically rather than listing them in the order they’re first used. I know some of you are probably thinking, “Wow, how anally retentive do you have to be to care about the order variables are listed in”, and the answer is “You know how anal I am if you’ve ever seen my code”. However, it turns out that there’s a practical reason why variables should be listed in the order used: in an error log created with LIST MEMORY, variables appear in the order declared, which can be very useful in determining where in a routine an error occurred. (To learn how to do that, you’ll have to come to Southwest Fox next year and attend my “Fix Problems Fast with Advanced Error Handling and Instrumentation Techniques” session.) So, I continued to use the “one variable at a time” tool.

Earlier this month, I sat in on Tamar Granor’s Make Thor Your Own session. In this session, she explained how to create your own Thor tools and work with plugins for existing tools. She used the Create LOCALs tool as an example, showing how its behavior is controlled with a plugin and how she modified the plugin to work the way she wanted. That turned on a light bulb for me; maybe I could do something similar so that tool would work the way I want.

This turned out to be incredibly easy to do. First, I opened the Thor Configuration utility by choosing Configure from the Thor menu. I selected the Tool Definitions page and chose the Create LOCALs tool, then clicked the Plug-Ins link:

SNAGHTML27e02bbf

The Manage Plug-in PRGs dialog appeared:

SNAGHTML27e288ba

I clicked Create to create PEME_CreateLocalsStatements.PRG in the Thor\Tools\My Tools folder of the directory where Thor is installed. This is my copy of the plugin code for the Create LOCALs tool that supersedes the one that comes with Thor. Looking over the code, I quickly found this:

Asort (laLocals, 1, -1, 0, 0)

Commenting out that line was all that was needed to make this tool work the way I want. However, it occurred to me that perhaps the tool would be more useful generically if sorting was user-configurable. Another thing Tamar showed in her session was how some tools have an options page and how to create your own.

To see the options for this tool, click the Options link when Create LOCALs is selected in the Tool Definitions page or select the Options page and choose Create Locals:

SNAGHTML27e977d0

As you can see, Create LOCALs already has a few options that configure the behavior of the tool, but not one for sorting. After a bit of digging, I found that the options for the tool are defined in the clsCreateLocals class in Thor_Options_Createlocals.VCX in the Thor\Tools\Procs folder. It turns out if you copy the VCX and VCT files to the My Tools folder, Thor uses that copy rather than the original. So, it was a simple matter to modify that class and add a “Sort variables alphabetically” checkbox.

SNAGHTML27f786df

I put the following code into the Init method of the checkbox to retrieve the existing value of the option, which defaults to true the first time:

llValue = execscript(_screen.cThorDispatcher, 'Get Option=', 'lSort', ;
    'CreateLocalStatement')
This.Value = nvl(llValue, .T.)

The InteractiveChange method saves the setting:

execscript(_screen.cThorDispatcher, 'Set Option=', 'lSort', ;
    'CreateLocalStatement', This.Value)

Because I used a BaseCheckbox from the same VCX as the class for the checkbox, and the Refresh method of that class expects the cControlSource property to be filled in, which it isn’t here, I added a comment to that method in the checkbox to override the default behavior.

I then made this change in PEME_CreateLocalsStatements.PRG:

*** DH 11/29/2013: don't sort variables unless we're supposed to
*Asort (laLocals, 1, -1, 0, 0)
llSort = nvl(execscript(_screen.cThorDispatcher, 'Get Option=', ;
    'lSort', 'CreateLocalStatement'), .T.)
if llSort
    Asort (laLocals, 1, -1, 0, 0)
endif llSort

Now variables are only sorted if the “Sort variables alphabetically” option is turned on.

As you can see in the first screen shot above, I defined Alt-9 as the hotkey for the Create LOCALs tool. So now, I don’t have to worry about creating local variables as I type code. I just press Alt-9 before I close the editor window and like magic, all the variables appear in the LOCAL statement at the top of the code. This saves me even more time that before.

If you haven’t started exploring Thor, I strongly suggest you do so. Its rich set of tools are guaranteed to have something that will increase your productivity.

Friday, October 25, 2013

2013 Lifetime Achievement Award Recipients

At the keynote of the 2013 Southwest Fox conference, we announced this year’s recipients of the FoxPro Lifetime Achievement Award(although I wasn’t there in person, I got to do it via Skype). Because of ties in voting, there were several recipients this year:

  • Janis (formerly Jim) Booth
  • Ted Roche
  • Sergey Berezniker
  • Mike Feltman, which was especially poignant because his wife Toni, a former recipient herself, presented it to him.

See the FoxPro Community Lifetime Achievement Award topic on the Fox Wiki for their photos and bios.

Congratulations, Janis, Ted, Sergey, and Mike. All are well deserving of this award.

Update: you can watch the award presentation in the streaming video of the keynote starting at 28:30.

2012 Southwest Fox Speaker Award

Cathy Knight (then Cathy Pountney) was the top-ranked Southwest Fox 2008 speaker, as measured by attendee evaluations. Her friends Toni Feltman and Jody Meyer felt that she deserved an award for this accomplishment, so they created one and presented it to her at the keynote of the 2009 conference. They filled the cup with chocolates because that’s Cathy’s favorite food (not dessert, food).

Since then, it’s been a tradition for the winner to present the award to the next year’s top-ranked speaker, so Cathy presented it to Rick Schummer for being the top speaker in 2009, Rick presented it to me for 2010, and I had the pleasure of presenting the award for 2011 to Rick Borup. At Southwest Fox 2013, the award went full circle when Rick presented it to Cathy for being the top speaker in 2012. Once again, the cup was filled with chocolates.

Congratulations, Cathy! There aren’t a lot of double-award winners out there.

Update: you can watch the award presentation in the streaming video of the keynote starting at 20:00.

2013 VFPX Administrators’ Award

The VFPX Administrators’ Award is an annual award given by the VFPX Administrators (Craig Boyd, Rick Schummer, Jim Nelson, and I) to recognize those people who made outstanding contributions to the VFP community through their projects on VFPX. The nominees this year were:

At the keynote for Southwest Fox 2013, the award was given to both Luis and Rodrigo. Both worked on two complex projects that add a lot of value to VFP. Congratulations to both and thanks for all your efforts in making VFPX the future of VFP.

Update: you can watch the award presentation in the streaming video of the keynote starting at 22:10.

Thursday, October 10, 2013

Seriously Bummed Out

Southwest Fox is one of my favorite times of the year. Rick, Tamar, and I work hard for almost a whole year getting everything organized so that by the time we actually get to the conference, there isn’t that much left to do. That gives us a chance to do our own sessions, sit in on other great sessions, hang out with old and new friends, and just generally have a lot of fun. It’s such a blast reconnecting with folks I only see once a year or even less. That’s why I’m so bummed out right now –- I won’t be going to Southwest Fox this year.

A medical issue has arisen over the past couple of weeks and as a result my doctor doesn’t want me travelling while we try to get this thing under control. It isn’t too serious –- just annoying and tiring enough that being at a conference will be a bit of a struggle. I’m confident we’ll get things worked out (and I’m already doing better this week than last), so it’s really just a case of lousy timing.

To make me feel even worse about missing the conference, there are several people I’ve never met or haven’t seen in many years coming to SWFox who I was looking forward to seeing.

My session time slots are being covered off thanks to Rick Borup, David Giard, and Tamar who stepped up at the last minute to fill in with extra sessions and Rick Schummer (gotta clarify given the number of Ricks we have as speakers <s>) who’s doing an extra instance of one of his sessions. An updated schedule will be available on the web site and via Guidebook later today. Thanks also to Rick and Tamar who had to pick up my duties. I couldn’t ask for better partners.

I’ll miss you all next week and am envious of the fun you’ll have. Have a great time in Phoenix and I’ll see you all next year!

Wednesday, October 09, 2013

Southwest Fox Streaming Sessions

Once again this year, Geek Gatherings is streaming the Southwest Fox keynote presentation, Thursday at 7:00 p.m. Mountain Standard Time (Arizona does not observe Daylight Savings Time). In addition, we are streaming the Project PolarFox: Sneak Preview session, Saturday at 5:15 p.m. Go to http://www.ustream.tv/channel/swfoxtv to watching the videos.

Thursday, October 03, 2013

New Version of Stonefield Query Unveiled at Southwest Fox

At one of the Southwest Fox bonus sessions on Friday night after the dinner party, I’m going to show the new version of Stonefield Query. Over two years in development, this is a complete rewrite in C#. Although we’ll eventually have a desktop version as well, the first release will be our web front-end. If you’re interested in seeing the future of Stonefield Query, even if you’re not currently using it, and you’re going to Southwest Fox, be sure to attend this session.

Southwest Fox and Southwest Xbase++ Have Gone Mobile!

Southwest Fox and Southwest Xbase++ have gone mobile! We’ve created a conference schedule on Guidebook, a popular mobile guide for events. Simply install the Guidebook app on your mobile device, then load the Southwest Fox/Xbase++ 2013 guide. You’ll be able to see complete session descriptions, view the conference schedule, see speaker photos and biographies, create to-do items, and best of all, create a customized schedule of sessions.

See http://swfox.net/Guidebook.aspx for details on how to set up our guide on your mobile device.

For the geeks among you (and who isn’t that reads this blog), here’s how we set up our Guidebook guide:

  • We created a free account on Guidebook.com.
  • All Southwest Fox/Xbase++ speaker and session data are in VFP tables (of course) and we have automated procedures for generating the sessions and speaker pages on the web site. Because Guidebook supports both speaker and session import via Excel or CSV files, it was only a little work to create those files from the data and import them.
  • Guidebook doesn’t support importing links between sessions and speakers, so we created those links manually: from session to the speaker for that session and from one instance of a repeated session to another. The cool thing about those links is that if you’re looking at a speaker, you have one-tap access to their sessions and if you’re looking at a session, you have one-tap access to the speaker and to the other instance of the session (in case you decide to see it at another time).
  • Guidebook also doesn’t support importing speaker photos, so those were uploaded manually.

Thanks to Eric Selje for suggesting we look at Guidebook at last year’s conference. I know I’ll be using the guide personally, along with Dave Aring’s Kokopelli application to help me select which sessions to attend when.

See y’all in a couple of weeks!

Wednesday, August 28, 2013

A new book: "VFPX: Open Source Treasure for the VFP Developer"

"VFPX: Open Source Treasure for the VFP Developer", authored by Rick Schummer, Jim Nelson, Eric Selje, Tamar E. Granor, and me, is now available.

This book is organized so you can select any VFPX project you want to know more about and read about it in a single chapter (except for a few projects that are so big, a single chapter wasn't sufficient). By the time you finish the chapter, you know how to install the tool or component, what it does, and all the functionality it provides. The authors share the benefits and the shortcomings in great detail. This book saves you time and helps you improve your Visual FoxPro development experience and the way your applications work for your customers.

Get it today!

Southwest Fox 2013 Early-Bird Deadline

One last quick reminder: you can save $50 by registering with the early-bird registration discount. The deadline is this Saturday, August 31st. Every registered attendee gets admission and white papers to all regular conference sessions. www.swfox.net.

Tuesday, July 02, 2013

You DID save Southwest Fox

Thanks to the support of both the Visual FoxPro and Xbase++ communities, Southwest Fox and Southwest Xbase++ will proceed as planned October 17-20 in Gilbert, AZ. As we said two weeks ago, Southwest Fox is one of the highlights of the year for us, despite (or maybe because of) the hundreds of hours that go into planning and running it. We are delighted that the Visual FoxPro community feels as we do, and voted with their wallets to keep it going.

If you haven’t yet registered, there’s still room for you. Register before September 1 for a $50 early-bird discount. Please continue to spread the word to your colleagues, clients, user group and anywhere else Visual FoxPro or Xbase++ is spoken.

See you in Gilbert in October.

Wednesday, June 26, 2013

Southwest Fox 2013: Super-saver deadline approaches

Thanks to those of you who responded promptly to our message about the future of Southwest Fox. Registration has picked up, but we still need to hear from more of you before the Super-saver deadline.

June 30th is less than a week away and we thought we would pass along a reminder just in case you forgot to type it into your task list, or put a yellow sticky note on your monitor. We still need people to register to make the conferences happen.

The conference takes place October 17-20, 2013 in Gilbert, Arizona and we really hope you can be there. We would hate to see you miss out on the $125 discount and the free pre-conference session. The pre-conference sessions are quite popular this year.

Head over to the registration Web site today: http://geekgatherings.com/Registration. As promised, we are not cashing checks or processing credit cards for new registrations until the middle of July.

Already registered? Thanks. Can you help us remind your fellow developers who have been procrastinating about the looming deadline?

Monday, June 17, 2013

You can save Southwest Fox!

Putting on a conference is a risky endeavor. Conference centers require a guaranteed minimum income to block the dates of a conference; for a conference like Southwest Fox and Southwest Xbase++, that minimum is in the tens of thousands of dollars.

As of today, we have 14 people registered for Southwest Fox and Southwest Xbase++ 2013. That’s about half the number of people who were registered at this time last year, and last year’s number took a big leap of faith on our part to carry on. See, our breakeven point is about 75 people, and according to our contract with the hotel, we have until July 2 to cancel or we’re on the hook for our guaranteed minimum whether there’s a conference or not.

Southwest Fox is one of the highlights of the year for Rick, Tamar and me. A ton of planning and work goes into organizing it, but we are happy to do it because we feel it’s an important way to keep our community going. We’re realistic enough to know that it won’t go on forever and each year could be the last. So, was 2012 the last year? You can help us make that decision. If you were thinking about going this year, vote to continue the conference by registering now. If you know others thinking of attending, share this message with them.

If we do end up cancelling, everyone who registered will get their money back in full, so you can’t lose out. (Just don’t make your flight reservation right way.)

The FoxShow #77 features an interview with Rick, Tamar, and I discussing this and other SWFox-related issues, so be sure to check it out. Andrew MacNeill also has a blog post about this.

Thursday, June 13, 2013

2013 Ceil Silver Ambassador Announced

Geek Gatherings is pleased to announce that the 2013 Ceil Silver Ambassador is Luis Maria Guayan. Luis is a well-known member of the Spanish FoxPro community, is one of the founders of PortalFox, is the project manager of the FoxBarcode VFPX project, and was a long-time MVP.

The Ceil Silver Ambassador Fund raises money from the VFP community to bring a developer to the Southwest Fox conference as an ambassador for the developers in his or her country. This gives the recipient the opportunity to meet and share experiences with developers attending Southwest Fox and gives other attendees the opportunity to learn about VFP development in the recipient's country.

The Fund is named in memory of Ceil Silver, a long-time member of the Visual FoxPro community, who passed away in January, 2009. Ceil served as Editor of FoxPro Advisor's Tips and Tricks column for many years and was the founder of the Westchester County FoxPro chapter of PADD, the Professional Association of Database Developers. She was also a contributing author to Special Edition Using Visual FoxPro 6. Ceil understood the value of attending professional conferences, and continued to attend them until her failing health prevented it.

Monday, June 03, 2013

2013 FoxPro Lifetime Achievement Award Nominations

The FoxPro Lifetime Achievement Award honors those individuals who have contributed a great deal to the FoxPro community over the years. See http://fox.wikis.com/wc.dll?Wiki~FoxProCommunityLifetimeAchievementAward~VFP for previous award recipients. These recipients wish to continue the award and have created a committee to select a recipient for 2013. The committee consists of all 14 living previous recipients, Alan Griver (yag), and Sergey Berezniker representing the FoxPro community. To submit your nominations for the 2013 recipients, please email me (dhennig@stonefield.com) by July 31, 2013.

Wednesday, May 29, 2013

Reminder about 2013 Ceil Silver Ambassador

The Ceil Silver Ambassador Fund raises money from the VFP community to bring a developer to the Southwest Fox conference as an ambassador for the developers in his or her country. This gives the recipient the opportunity to meet and share experiences with developers attending Southwest Fox and gives other attendees the opportunity to learn about VFP development in the recipient's country.

We are looking for nominations from the VFP community for the 2013 recipient. To nominate someone you think deserves to be selected, please email their name and a brief list of their contributions to the VFP community to ambassadorfund@swfox.net. Names must be submitted no later than May 31, 2013.

In addition, we are looking for donations to allow us to pay for the travel costs for the ambassador. We urge you to consider donating any amount you see fit, small or large, to this fund. See http://www.swfox.net/ambassador.aspx for details. 100% of donated money goes to the travel costs for the ambassador. Not a single penny is used to cover administrative costs. All time managing the fund and working through the selection process is donated. No one is paid for their time.

Thursday, May 23, 2013

Southwest Fox 2013 Registration Now Open

Geek Gatherings LLC has officially opened registration for Southwest Fox 2013! The developer conference will be held October 17-20, 2013 at the SanTan Elegante Conference and Reception Center, the same great location as last year. Last year was a huge success.

Super-Saver Registration, which saves you $125, is available only through June 30th, so don't wait. Head over to the registration Web site today: http://geekgatherings.com/Registration

Registration fees are the same as last year! More details are available on the conference's registration page.

Wednesday, May 01, 2013

Southwest Fox 2013 Speakers and Sessions Announced

Speakers and sessions for Southwest Fox 2013 have been announced. Like we try to do every year, we have a couple of new speakers this year: Hank Fay and David Giard.

You may notice that rather than having separate speaker pages for Southwest Fox and Southwest Xbase++ (a conference held concurrently with Southwest Fox), we’ve combined them into one. The reason for that is some sessions apply to both conferences, such as Tamar Granor’s Office 365: An IT Department for Small Businesses session and David Giard’s How I Learned to Stop Worrying and Love jQuery session.

Some of the sessions I’m personally looking forward to are:

I’m very excited by this year’s lineup and think you will be too. Registration opens in a couple of weeks. See you in October!

Thursday, April 18, 2013

2013 Ceil Silver Ambassador

The Ceil Silver Ambassador Fund brings a developer to the Southwest Fox conference as an ambassador for the developers in his or her country. This gives the recipient the opportunity to meet and share experiences with developers attending Southwest Fox and gives other attendees the opportunity to learn about VFP development in the recipient's country. The trip is paid for by the VFP community's donations to the Fund.

We are looking for nominations from the VFP community for the 2013 recipient. The Ambassador selection committee consists of Southwest Fox organizers Rick Schummer, Tamar Granor, and Doug Hennig, former Ambassadors Emerson Santon Reed, Cesar Chalom, Bernard Bout, Borislav Borissov, and Jun Tangunan, and VFP community members Christof Wollenhaupt and Rick Bean. To nominate someone you think deserves to be selected, please email their name and a brief list of their contributions to the VFP community to ambassadorfund@swfox.net. Names must be submitted no later than May 31, 2013.

In addition, we are looking for donations to allow us to pay for the travel costs for the ambassador. We urge you to consider donating any amount you see fit, small or large, to this fund. See http://www.swfox.net/ambassador.aspx for details. 100% of donated money goes to the travel costs for the ambassador. Not a single penny is used to cover administrative costs. All time managing the fund and working through the selection process is donated. No one is paid for their time.

Tuesday, March 19, 2013

Southwest Fox/Xbase++ 2013 Call for Speakers

Just a reminder that session proposals for Southwest Fox 2013 and Southwest Xbase++ 2013 are due by 8 AM EDT this Friday, March 22. If you’re interested in speaking, please download the Call for Speakers and submit your proposals using our new online application at www.geekgatherings.com/submission. We look forward to hearing from you.

Saturday, March 09, 2013

A Couple More Report Designer Bug Fixes

I’ve blogged a few times about minor fixes in the VFP Report Designer: Fixing a Report Designer Bug, Updating the VFPX ReportBuilder.APP, Fixing Another Report Designer Issue, and Fixing Yet Another Report Designer Issue. Here’s a couple of more fixes:

  • If you look very closely at the Format page of the text box properties dialog after selecting Numeric, you may notice that the “CR if positive” checkbox doesn’t quite align with the other checkboxes in its column; it’s one pixel too far to the right as you can see in this enlarged image:

clip_image002

  • The next image shows that in Windows Vista and higher, in which case Segoe UI is used as the font for controls, the “SET DATE format” option is cut off.

clip_image002[4]

I implemented these fixes in the copy of ReportBuilder.APP (and the corresponding source code) available on VFPX. While I was at it, I also implemented Cathy Knight’s fix for the infamous “SET TALK” report output bug in ReportOutput.APP and its source code (thanks to prompting by Christof Wollenhaupt).

Wednesday, March 06, 2013

Call for Speakers - Southwest Fox and Southwest Xbase++ 2013

We've issued the Call for Speakers for both conferences. If you are interested in presenting at either conference, please check out http://www.swfox.net/callforspeakers.aspx and consider submitting sessions via our new Web-based submission application.

Thursday, January 03, 2013

Improve Your App’s UI

Kevin Ragsdale has a great series of blog posts on improving the UI of your applications, a topic near and dear to my heart as well. Highly recommended reading.