Welcome to Foxite.COM Community Weblog Sign in | Join | Help

VFP How-To (RSS)

Best Practices for Coding

  In my last article I was stressing the importance of testing code with realistic data volumes in order to detect potential performance issues when the code is actually deployed. That got me to thinking about something that I don't normally think
posted by andykr | 7 Comments
Filed Under:

But it worked fine on my machine!

How many times have you thought that? Or even worse, actually heard yourself saying it? Come on, now, be honest! When you hear that, in the context of an application, or some screen or function within an application, what does it really mean? Basically
posted by andykr | 5 Comments
Filed Under: ,
Attachment(s): GenData.zip

Properly Formatting Text Strings

One of the perennial issues that we all encounter from time to time is that of properly formatting words that have been entered into a database. I am sure that, just as I have, you will at least once have run into the situation where you have to produce
posted by andykr | 1 Comments
Filed Under: ,
Attachment(s): ChangeCase.zip

So, what's so bad about Public Variables?

Every once in a while the question about whether Public Variables are something that should be used in VFP. Now, there are lots of opinions on this matter and there are several arguments that come up time and time again in defense of using Public Variables.
posted by andykr | 2 Comments
Filed Under: ,
Attachment(s): variableclass.zip

Using a Memento Pattern to Implement CTRL+Z

The native behavior of Visual FoxPro controls is that as long as a control has focus, pressing CTRL + Z (or the escape key) undoes any change that has been made since it gained focus. However, once the user moves off the control, the ability to undo changes
posted by andykr | 1 Comments
Filed Under: ,
Attachment(s): Memento.zip

More of my Useful Utilities (at least, I think they are)

Like all developers, whatever their preferred language or environment, I have my own personal set of tools and utilities that I use to make life a little easier for myself. Although not particularly generic, or even clever, I find that these little things
posted by andykr | 3 Comments
Filed Under: ,

Programming to Interface – a real story

What constitutes a Public Interface, and where does it come from? An object’s Public Interface is simply the set of Properties, Events and Methods (PEMs) that it exposes to its environment. Notice that the key word here is ‘exposes’. An object may (and
posted by andykr | 1 Comments
Filed Under: ,

Creating Data Driven Pop-Up menus in VFP

One of the little tools that Marcia and I use all the time when working in VFP is a pop-up menu generator that allows us to select a development environment easily and quickly. Yes, we know all about the Task Pane but personally I have always found that
posted by andykr | 0 Comments
Filed Under:
Attachment(s): PopMenu.zip

Finding the length of a string in a specific font

One of the things that I often found myself doing when working in VFP was trying to decide how large a textbox had to be in order to accommodate the maximum length of the data that was permitted for its underlying source given a specific font and size.
posted by andykr | 3 Comments
Filed Under:
Attachment(s): sizestr.zip

NODEFAULT, DODEFAULT() and Scope Resolution [::]

A recent thread on Foxite highlighted, once again, the confusion that surrounds this little group of commands and functions. The help file isn't exactly helpful either, so let's start with the definition of NODEFAULT from there: NODEFAULT Prevents Visual
posted by andykr | 3 Comments
Filed Under:

Controlling Controls in VFP (Part 2: CommandButtons)

In the last article I showed a methodology that enables controls to react to changes in a form level property by altering their appearance. In this article I want to look at another aspect of controlling how things happen in a VFP  application –
posted by andykr | 0 Comments
Filed Under:

Controlling Controls in VFP (Part 1: Display Styles)

A question that often comes up is related to how to handle scenarios where controls on a form need to behave differently according to some condition. For example, in our applications our normal practice is to bring forms up in view–only mode. This means
posted by andykr | 8 Comments
Filed Under:

Using Metadata to the Full – Part 4

Metadata to the Max! In the previous examples that I have shown we have concentrated on “Definition Metadata”. In other words we are avoiding the necessity to write explicit code by storing variable elements as data. This allows us to extend, or modify,
posted by andykr | 0 Comments
Filed Under:
Attachment(s): MetaData_Demo.zip

Using Metadata to the Full – Part 3

Things have been a little hectic for me this past month, not helped by the death of our old friend and colleague, Ceil Silver, significant down time for our cable system (no phone, internet or TV for days – the last is no hardship but the first two were
posted by andykr | 0 Comments
Filed Under:
Attachment(s): DataPathMgr.zip

Using Metadata to the Full – Part 2

In my last article I said that I would look at some practical examples of how we can use metadata in our applications, so here goes. The first example is probably the simplest (and most widely used) of all types of metada a message definition table and
posted by andykr | 1 Comments
Filed Under:
Attachment(s): MetaData02.zip
More Posts Next page »