Monthly Archives: March 2007

we can pass info to and retrieve info from a form like this:

   do form with arg1,arg2 to result

which is similar to calling a function:

   result = form(arg1,arg2)

when i am developing a form, i often need to change the number of input and output arguments, which means i need to constantly adjust the form calling interface. 

by using a parameter object as an input/output mechanism simplifies it like below:

local loparam
loparam = createobject('empty')
do form with loparam
? loparam.output

also the use of parameter object makes it flexible in when and where to assign… Continue reading

often times i need to break out from a loop if user hit the escape key.  in order to do that, will have to:

  1. save the existing state of the set escape
  2. set up on escape
  3. restore set escape afterward

to those not familiar with vfp commands and how vfp does things, it may be difficult to figure this logic out.  i have encapulated all this into a class to make it easier to understand what is happening.

 loesctoabort = createobject('syesctoabort')
 for i = 1 to infinity
    if loesctoabort.isaborted()
 release loesctoabort

the class is:

define class… Continue reading

i use inno setup to build the installer for my app.  i like to show the version number (from the version resource in the compiled exe) and the built date in the installer as show below:

since inno setup is script based, that can easily be done as below:

but i don't want to manually update the inno script every time i have a new build, so i automate it.  i already have a make.prg which i run to build my project, all i have to do is to enhance it to update the version and timestamp automatically. 

that boils… Continue reading