Thursday, March 30, 2006

Living in Glass Houses

Craig Berntson - Blogger has comment moderation, so open up the comments on your blog. Ya can't ask a question on the post and not have comments so we can set you straight. FYI - Doug had the RSS feed early today.

Comments are just as big a deal as having an RSS feed exposed on a blog. Comments are probably more important. Both FireFox and FeedDemon recognized Doug's feed even without the link. All good tools do.

Doug Hennig now blogging

Doug Hennig is absolutely one of my favorite authors and speakers in our community, and I for one am very happy he has decided to start a blog. This was an instant subscription when I found out yesterday. Welcome to the blogosphere Doug!

Wednesday, March 22, 2006

Southwest Fox Initial Speaker Selection

Wow, Jim Booth is speaking at Southwest Fox! Talk about an instant bonus to help you make your decision to attend this fantastic fall conference a no-brainer.

This is part of the super list of speakers Bob has on tap for - FoxPro Yesterday, Today, and Tomorrow. Other speakers include Marcia Akins, Bill Anderson, Jim Booth, Craig Boyd, Mike Feltman, Toni Feltman, Tamar Granor, Doug Hennig, Claudio Lassala, Ken Levy, Andy Kramek, Cathy Pountney, an undisclosed guest speaker, and yours truly.

I will be presenting a new session I am developing called the Professional Developer's Toolkit, and by popular request on last year's evaluations - a revamped Fishing with a ProjectHook. Doug Hennig, Craig Boyd, and I are cooking up the conference keynote address, which should be both fun and revealing.

This was by far the best and highest rated North American conference last year and I believe this year is going to top last year. I hope you can join us in Tempe October 19th to 22nd, 2006. Registration is already open with Southwest Fox Alumni and user group discounts available.

I know I am geeked!

Saturday, March 18, 2006

FoxPro Tips: VFP's EditorOptions

If you author any kind of whitepaper or article with Visual FoxPro example code you quickly understand the need to suppress the rich text formatting included in VFP 9 when you copy code to the clipboard. At first I really liked this feature for my own technical documentation, but when I work with conference session templates, magazine templates, and Hentzenwerke Publishing templates I am frustrated because it breaks the style guides from the various publishers. During the VFP 9 beta the feature was part of the product and not configurable, but the voices of the beta testers were heard loud and clear. We want a way to shut this off.

I have helped many developers turn off this feature, and today while working on my error handling session for GLGDW 2006 I realized I turned this on (nice when sharing code in email or posting on a forum) and need it off while writing the whitepaper. I have a program to toggle the setting. Here is the code:

* Toggle rich text formatting to clipboard
IF 'X' $ _vfp.EditorOptions
* Turn it off
_vfp.EditorOptions = STRTRAN(_vfp.EditorOptions,"X", SPACE(0))
* Turn it on
_vfp.EditorOptions = _vfp.EditorOptions + 'X'

You can hook this up to a developer menu item, or toolbar, or just run it from the Command Window.

Bonus Tip
While reviewing the code I remembered another tip to share. IntelliSense has a feature called C++ Operator Expansion. I use this all the time. If you have a variable like lcErrorString and you want to concatenate some text to the existing string you can enter the following in the program editor:


Then hit the space bar and you will see:

lcErrorString = lcErrorString +

You are ready to type in the rest of the logic to perform the concatenation. There are several C++ operators to work with in VFP's IntelliSense.


The reason I was inspired to write the bonus tip is the situation where you have a object.Property and want to concatenate or increment, like _vfp.EditorOptions. If you have code like this in the program editor:


And hit the space bar, nothing happens. I reported this as a bug during one of the betas. The workaround is simple, but you have to remember it when writing code. Include a space between the property name and the operator, then hit the space bar after the operator.

_vfp.EditorOptions +=

Enjoy the weekend!

Friday, March 17, 2006

VirtualPC - Setting up a VM

I am looking for a blog entry, or more likely a white paper or book on Microsoft's VirtualPC, and the setup of a Virtual Machine for a client (read - I am not interested in writing something already written on the subject).

I am not looking for a How To Install VirtualPC on Your Computer - although this could be part of the white paper. I want to point to a resource stepping the user through the process of building their first Virtual Machine, installing the OS, and helping them with the choices and some optimizations.

Any pointers?

FoxPro Tips: Toolbox

The Toolbox is a very powerful tool added to VFP 8 and improved in VFP 9 by the simple fact it can be docked. Several developers refer to the Toolbox as the Forms Control toolbar on steroids (which might not be as politically correct as it once was {g}). I like the Toolbox for several reasons, but the one I really like is working with ActiveX controls.

You can drag and drop ActiveX controls from the Toolbox to the Form or Class Designer. Handy in itself, but not where I think the real power is. I like dropping the ActiveX control in a program or method window. Dragging the ActiveX controls to an editor provides the needed NEWOBJECT() code. The following code was created when I dropped the DynaZip Zip ActiveX control in the editor:

Olecontrol = NEWOBJECT("dzactxctrl.dzactxctrl.1", "dzactx.dll")

Now you do not have to look up the registration information for the control in the Windows Registry or the documentation distributed with the control. You can change the line of code to:

LOCAL loZip AS "dzactxctrl.dzactxctrl.1"

Now as soon as you type loZip. in the editor you get IntelliSense for the ActiveX control. This works well and really increases productivity when you do some Automation code with a control of this type.

Tuesday, March 14, 2006

FoxPro Tips: Object Browser

The Object Browser was new in Visual FoxPro 7. It exposes the public and protected interfaces of COM object libraries and ActiveX controls. Inside these libraries is a wealth of information concerning the properties, events, methods, constant values, and classes available for developers. This tool is very important to developers who write Automation code and need to understand the documented ways of using a particular Automation object.

Determining the values of constants defined in a COM object

One of the truly grueling tasks developing automation code is determining the constants used in the examples. These constants can be translated into #DEFINE code. Before you had the Visual FoxPro Object Browser you needed to trudge through Help files, hope examples documented the values, or use a tool like the object browser found in the VBA editors of Microsoft Office to find these values. This is a time consuming process for sure. Tools like the West Wind GetConstants.EXE read the type libraries and generate the #DEFINE code, which is easily compiled by Visual FoxPro.

The Object Browser can generate the #DEFINE code efficiently and is a real time saver. To accomplish this, open up the COM or ActiveX component, drill down the TreeView to expose the Constants node. Open up a program editor (program, or class method). Drag the Constant branch and drop it in the editor. Not only is the #DEFINE code typed in with the constant name and value, but the documentation for the constant is also included as a comment for the #DEFINE if the constant has a description. If you drag the constants branch you will get all the constants in the editor. You can also drag individual constants if you only need specific ones.

GOTCHA: I have experienced constants that are decimal values getting rounded to zero (with MapPoint). If this is the case, I recommend the GetConstants.exe from West Wind, which does not suffer from the same bug.

Use the Object Browser to create class templates to implement interfaces

A very powerful feature in Visual FoxPro is the capability to write code in our custom applications responding to events in other applications. For instance, you can write code to respond to a user closing a spreadsheet, or sending an email in Outlook, or doing a mail merge in Word. This is done with the IMPLEMENTS clause of DEFINE CLASS as well as the EventHandler() function.

The Object Browser assists you in writing tedious code in this respect. First open up the COM or ActiveX control in the Object Browser. Then drill down through the TreeView and locate the Interfaces node. Open up a program editor (program, or class method). Drag the interface node and drop it in the editor. The class definition is written, including the IMPLEMENTS and template code for each of the methods exposed. All you have to do at this point is rename the class from MyClass to something more descriptive, and add code to the appropriate method.

Find out the name of the OCX file to ship with my deployment setup

The Object Browser helps Visual FoxPro developers with numerous features for ActiveX controls. One of the simpler, yet more helpful items is displaying the actual file name for the OCX and other details about the control.

Open up the Object Browser and select an ActiveX control from the list. If you select the root node for the control there are details about the OCX displayed in the bottom pane of the Object Browser. Information like the file name, the Help file, and the GUID is presented for the developer. This can be handy when you need to find out what OCX file is to be included in a deployment package, and determine where the Help file is installed on the hard drive.

Happy Pi Day

Have a slice of pie today to celebrate Pi Day (3.14) and Albert Einstein's birthday. A true geek holiday if there is one.

I was having some fun with my kids who are all excellent in math. We were challenging each other to see who knew the most digits of Pi:

(no this is not how many digits I know {g})

More here: Pi to One Million Places
And here: The Ridiculously Enhanced Pi Page

For the record, dad wins this contest even though my kids are much smarter than I am.

Sunday, March 12, 2006

User Group Presentations

Been meaning to post these for y'all just in case you are in the area.

March 21, 2006
Mid-Michigan Fox Users and Developers Group (Lansing, MI)
* Using and Extending the VFP Data Explorer
* Using CASE Tool Techniques

April 8, 2006
Grand Rapids Area Fox User Group (Grand Rapids, MI)
* Best Practices for Error Handling (rehearsal for GLGDW)

May 11, 2006
Midwest FoxPro User Group (Kansas City, Missouri)
* The Professional Developer's Toolkit
* Best Practices for Error Handling

More to come, but these are in the next couple of months. Feel free to send me an email if you are interested in having me present a session or two for your user group.

Friday, March 10, 2006

Advisor DevCon Speakers

I received some exciting news a couple of weeks ago. I have been sitting on this until the clearance was provided. This evening I was given the okay to publicly announce I am speaking at Advisor's DevCon this August 27-31 in Phoenix.

This year the theme for DevCon is "It's all about integration!" I will be presenting "Using and Extending the Visual FoxPro Data Explorer" and "Deployment in the Real World."

It looks like I will be in good company. The other speakers are:
  • Craig Boyd
  • Jim Duffy
  • Markus Egger
  • Toni Feltman
  • Cathi Gero
  • Tamar Granor
  • Alan Griver
  • Doug Hennig
  • Lisa Slater Nicholls
  • Colin Nicholls
  • Cathy Pountney
More details will be posted soon on the Advisor Web site.

I was a little worried Therese was going to ask me to pass on the invitation because this is the week my son moves back to college. Once again she is going to take on additional parental responsibility while I go off and have fun with my FoxPro friends. I am a very lucky geek.

FoxPro Popping Corks

Looks like more positive press about Visual FoxPro and specifically Sedna in the news. Check out the FoxPro Popping Corks in Redmond Magazine. Thanks to Ken for pointing this out to me.

The only issue I have with the article is the insinuation you have to be in the FoxPro inner circle to get the bits for the Sedna Community Technology Preview (CTP). Nada, everyone can get the bits. It is all part of the new Microsoft approach to the alpha/beta cycle and their transparency in approaching the release for the next release of VFP.

Tuesday, March 07, 2006

Is it just me... AT&T?

Is it just me or are things out of control again?

When I was in college (1984) AT&T was considered a monopoly by the United States government. For the youngsters or folks outside of the USA in the reading audience: AT&T was the phone company and often was referred to as Ma Bell. The government took action and busted up AT&T for our benefit into the "baby bells". Huge amounts of cash was spent on this event.

Fast forward to 2005 and SBC Communications (a combination of Ameritech and several of the original baby bells) buys its former parent company AT&T for US$16 Billion . Fast forward to 2006 and AT&T is now prepared to buy BellSouth for US$67 Billion. Sixty-seven BILLION dollars? When the merger is complete it will mean almost half of the 24 baby bells will be back under the AT&T umbrella.

To add salt to the wound AT&T sold AT&T Wireless to Cingular Wireless, which happens to be owned by SBC Communications, which later bought AT&T. The other owner of Cingular Wireless is BellSouth soon to be part of AT&T. Another case of company cannibalism?

Where does all this money go??? Does this make them half of a monopoly again?

Is it just me...?

Monday, March 06, 2006

Living in a VFP Time Machine

Yesterday I experienced some nostalgia with Visual FoxPro. A few months ago Rick Borup asked me if I would write a short article about discovering something new in Visual FoxPro for the Advisor Discovery column he tech edits in the Advisor Guide to Microsoft Visual FoxPro.

Yesterday I wrote this short article and had to do a little fact research for the piece. I pulled off the shelf my binder for the 1995 Microsoft FoxPro International Developer Conference (DevCon). This is the DevCon where Microsoft revealed Visual FoxPro 3.0 publicly. I went through the binder and read the topics and descriptions and the speaker list. Wow.

Interesting statistics:
  1. 80 people from the Microsoft VFP team are listed as special guests (Calvin Hsia and Cameron Slade are the only two remaining on the team today, and several are high up corporate ladder in Microsoft and other companies).
  2. Only 9 CompuServe MVPs (Beane, Booth, Freeman, Granor, Pollack, Ruple, Sexton, Shultz, and Slater), two are still officially MVPs and several more are active in the Fox Community. There are 33 VFP MVPs today.
  3. 50 sessions
  4. 50 speakers
  5. Up to 13 sessions going on at one time
  6. 14 session slots plus keynotes.
A lot has changed in 11 years, but some things still remain the same. For instance, the approach I take to picking sessions I attend during the conference. I looked at my session choices for the 1995 conference and questioned some of my selections. Looking back I missed Savannah Brenthall's Overview of the Visual FoxPro Object Model and Alan Griver's FoxPro and Client-Server - A Path to Reengineering. In reality the choices were tough because I could only see a third of the sessions. I had to make choices that not only benefited me, but benefited the company I worked for (EDS) and the team I was a part of at the time.

In this binder I still have the 28 page "Trip Report" I did for my team. I detailed all the sessions I attended, all the benefits of moving the development of our organization to VFP and SQL Server from FoxPro 2.6 for DOS and Windows. It looks like the arguments I made then would still work today.

It was a great conference and it was fun reliving some fond memories I probably should have used the time to work on the sessions I will be giving at the conferences this year, but I think the perspective of the 1995 conference will better prepare me for the 2006 season.

Anyway, if you recall a moment in time when you discovered something about Visual FoxPro and have a spare hour or two, write it up and send it off the Rick Borup. I have enjoyed reading the few articles published in this new column and look forward to reading your discoveries.

Friday, March 03, 2006

Treo 700 and ActiveSync

Quite a frustrating week with my new Treo 700 cell phone. As I noted in a prior post, ActiveSync is not doing its job when it comes to synchronizing tasks, contacts, and calendar entries. It is something I expected to be simple. Outlook, ActiveSync, and Windows Mobile 5.0 are all owned by Microsoft so I expected this to be a no-brainer. It has been more than a little frustrating, but the end of the story has a happy ending.

This week I spent too much time (which is a premium of late) researching error 85010014 on the Web and in some Windows Mobile forums. Lots of ideas, but most point to Exchange Server trouble or not running the latest ActiveSync (which I am). Not fun.

So I broke down and headed to my local Verizon to the tech support desk (the same desk who told me I was out of touch when it comes to technology last summer {g}). They asked me one question and handed me the phone number to the Verizon Data Tech Support line. I called them the next morning and after two simple questions they forwarded me to the Palm Tech Support line. Guess Verizon cannot keep up with technology {g}.

The guy at Palm was nice and promised to get this problem resolved. I provided the error code and he said, he had seen this before. Finally, a fix at hand.

We went through my entire system tray and stopped the apps he felt could conflict (strange how SQL Server and SnagIt could be trouble, but the Palm HotSync is not). No luck. Next he had me hard reset the phone. A bit harsh from my perspective, and it made no difference other than for me to lose all the settings I made setting this phone up. No problem, just another half hour of my time to reload the programs I have installed and the settings I made. Next step, Outlook must be broke. At least this time he had me back up my PST file before attempting to the Detect and Repair option. Still no luck. The next step suggested is to uninstall and reinstall Outlook. This is where I drew the line. No possible way am I taking this drastic step. Why not just recommend I reformat the drive? Sheesh. I rely on Outlook as much as I rely on Visual FoxPro to make a living.

This morning I decided to research alternative sync tools. I came across two: PocketMirror for Windows Mobile and Intellisync. I have been a big fan of PocketMirror with my PalmOS PDAs. It rocks and is exactly what I expect out of a sync tool. Simple decision. I checked out the Web site and it is only US$50. I called Chapura and unfortunately they have not released it yet and don't have a beta program. It is expected to be released in a month. Too bad, because I cannot wait that long because the phone has to go back in 19 days if I cannot get this to work. I am a big fan of brand loyalty so this hurts.

I downloaded the trial of Intellisync and within 30 minutes I have all my contacts (nearly 500 of them which surprised me), all 800 calendar entries, and 200 tasks all synced to the phone. Oh, and it syncs subfolders! Swwweeeet! Subfolders is something ActiveSync does not have a clue about. Guess I have some new brand loyalty. Intellisync not only synchronizes Outlook, it syncs with a bunch of PIM apps. It also syncs to a PalmOS device. It seems like a great deal at US$70.

So I have 30 days to evaluate this software and I am planning to make a decision much sooner than the deadline. My advise to you if you are thinking about PocketPC is to skip ActiveSync for everything other than transferring files and loading software. Save yourself hours trying to solve this dumb problem.

By the way, I really like the phone and now that all my contacts are sync'd, life is good. Like I said, a happy ending.