Regular Expressions in VFP

motivation
based on some research i did in december 2005 and currently refreshed due to a vital discussion in on of microsoft’s news groups at news://msnews.microsoft.com/microsoft.public.de.fox (german) about the future of visual foxpro, i decided to finalize and deploy my com proxy for .net. as you might guess the name of this component is its main purpose. it is a dynamic-link library that provides features of the .net framework classes via com to any legacy programming language like visual foxpro. contrary to current sedna ctp this component has the same interface for regular expressions as the vbscript object has. so, this way it is a lot easier to switch between different implementations.
 
setup and installation
the component comes in two flavors – for .net framework 1.1 and 2.0. the setup routine installs both in separate folders and registers both in windows. but no fear, the progid is the same for both, so it’s again very handy for a vfp developer. last registration of the component is the active one. i’d like to mention that the registration uses the /codebase switch of regasm tool and therefore creates no entries in to the global assembly cache (gac) on the machine. the current version of the setup is available at my german blog at the url
 
 
just get the file and follow the installation instructions.
 
usage in visual foxpro
so, while the components are com-based dynamic-link libraries usage in visual foxpro is done with its createobject() function. the returned object reference is an instance of .net’s regex class.
 
regex = createobject(“prolib.regex”)
? regex.ismatch(“abc”,”\w”)
 
you can use any option and functionality of system.text.regularexpressions.regex in visual foxpro now. further information and details on this namespace are provided in the msdn
 
 
sincerely, joki
Posted in Uncategorized | 1 Reply

New InfoPath template for blogging

today, i finally switched my infopath template from simpleblogger to csblogger. now i’m again able to write my postings to the foxite weblog offline in infopath and submit the content anytime later. editing articles and reading comments is possible as well. personally, i’d like this kind of front-end to web sites. the infopath template is more comfortable than the web client, and therefore i’m able to write my entries in chunks even while not connected to the internet.
 
so, if you’re interested in csblogger take a look at the url
 
 
the latest version 1.1 works fine with the community server here at foxite.
 
sincerely, joki

VFPConversion – VFP and/or .NET?

after the community gettogether at cebit fair i’d like to talk a little bit about vfpconversion. vfpconversion? never heard of? well, fine. vfpconversion is a corporation of several companies that share high experiences in visual foxpro as well as .net programming skills. there are a lot of well-known developers onboard.
 
there are several training events all over the globe – okay mainly u.s.a. and europe – that explain the principals of the .net framework as well as programming concepts in c# and vb to vfp developers. i think the whole stuff is more than worth to attend because it’s a vey good chance to talk to .net developers as well as vfp developers and share experiences.
 
personally, i work with vfp since version 6.0 service pack 5 back in early 1999, and since 2003 with c# and the classes of the .net framework. currently, my language of choice is still foxpro but with every new version of c# it’s getting closer to my requirements. and therefore even more attractive than vfp. but thats mainly a matter of the huge class library and possibilities the framework itself provides.
 
talking about sedna ctp, i’m actually disappointed. especially while playing around with the com proxies. hell, it’s quite easy to program a com class in .net and to provide those functionalities to vfp. but the regex sample is quite annoying. i already wrote a similar com proxy in late 2005 with the same interface as the vbscript.regexp com server. this way, you don’t need to change any line of code but the createobject() statement to get a reference to the com object. okay, it’s just a ctp but it’s really disappointing. hopefully, future releases of sedna might bring a lot more useful functionality.
 
sincerely, joki

AfpWiki Core Engine available

hi,

just published the core engine of afpwiki. the code is reuseable for own purposes – whether it is web development or desktop development…

message from news://news.prolib.de/prolib.public.afp.english

hello afp coderz,

i’d like to share my code fragments of the afpwiki core engine with you
all. attached to this message you’ll receive a zip archive with a sample
and procedure file to run afpwiki comparable solutions.

it’s a standalone sample and will be a sample of future releases of afp.
just drop it into a web folder and call afpwiki.afp in your browser. this
sample requires html plugin for active foxpro pages.

if you’re going to integrate the code in your existing afp applications
you have to do these steps:

– include the procedure file into your afp application ([xxx.afpa.code]
or [xxx.afp.code]):
*!<[include: “afpwiki.code”]>

– call the function wikinize:
m.lcvalue = wikinize(m.lcvalue)

the core engine is just the break down core engine of afpwiki. it has no
storage or versioning capabilities as afpwiki provides.

i would be very nice if you send in any questions and improvements on the
code. either send replies to this thread, or drop me a mail at
jochenk@prolib.de / joki@afpfaq.de

disclaimer: the code is provided “as-is” and you are using it at your own
risk. 😉

kind regards, joki