Monday, October 03, 2005

MenuDesigner - Beta?

Today in his blog, Andrew MacNeill asks when the MenuDesigner Professional beta will be starting. The answer is simple, when it is ready and not a day sooner. I worked on it a bit at the MVP Summit and a little this afternoon when I needed a break from all the catching up I have to do after being out of the office for the last week. There is a fair amount of work to do on it, but I am definitely in the stretch run now.

The problem solved at the MVP Summit was something very simple once you have 20/20 hindsight. When I first sat down and designed the MenuDesigner I listed the features I felt were necessary to make the product sell. I then prioritized them based on difficulty and started working on the list with the most difficult first. The reason I took this approach is fairly obvious. If I hit a technical showstopper, I would have invested less time before scrapping the product. One of the last features on the list is adding a record. At first glance this may sound easy. I mean, how hard can it be to APPEND BLANK to the MNX file, which is nothing more than a DBF? It is not hard, except for the act that GenMenu depends on the sequence of records in the MNX. To retain full compatibility with VFP and the MNX structure, I have to maintain this record sequence. To accomplish this I was depending on the old FoxPro INSERT record command. Not the SQL Insert, the old Xbase INSERT, which inserts a record physically between two other records. When I first tested this out it failed miserably.

So at dinner at the summit someone (I think it was Ken Levy) asked me about the MenuDesigner and when it was going to ship. I brought up the latest technical hurdle and David Stevenson mentions he is tech editing an article for FoxTalk which uses this command. This leads to discussion and then Doug Hennig has me search the new VFP 9 ReportBuilder project for the command. Sure enough it is in the code so it must be working. More discussion. I tried a couple of things and then we came across the one little piece of information missing from my original scenario: turning off buffering. You see, one of the base features of the MenuDesigner and the native VFP Menu Designer is the option of not saving your changes. Simple to implement with buffering. So now I have to implement my own buffering with a cursor separate from the MNX cursor I was using up to this point. This is not a super big deal. I have to change some code in the menu opening method and some more in the saving menu method and I should be good to move on to the actual code to add an item to the menu.

Back to this 20/20 hindsight, it makes perfect sense that VFP would need exclusive use to physically insert a record. I had that part. It also makes perfect sense that VFP would not allow buffering on the table to physically insert a record. I just wish I would have thought about this more, or the MVP Summit would have been months ago. {g}

So now you know.... the rest of the story.

2 Comments:

At 10/04/2005 05:32:00 AM, Blogger wOOdy said...

Hi Rick,
and there is another Gotcha for the INSERT command: It only works if there is NO index attached to that table. Which also makes sense, since it would have to reorder the whole index with each insert.

 
At 10/04/2005 09:34:00 AM, Blogger Rick Schummer said...

Thanks for additional information and clarification wOOdy. Looks like I am safe since the MNX file does not have an index. Lucky for me.

 

Post a Comment

<< Home