Skip to main content

Working Between Visual FoxPro 8 and 9

Many developers have production applications running with one version of a runtime yet do development in a later version. This lets daily work take advantage of the newer productivity tools while the final application is still using the older runtime. The challenge here is ensuring you don't use features in the newer version in code that will run in an older version.
 
A great example is using MESSAGEBOX() to show numbers or dates. Recent versions of Visual FoxPro let you do a MESSAGEBOX(5) and it will do the internal translation between the numeric value and the string equivalent. Seemingly a very simple function yet if you get used to using it, and then have to run on an older version of FoxPro that doesn't support it  - you get a invalid type error message.
 
Likewise with VFP 9 and VFP 8 but this time, it's something a little more hidden. VFP 9 allows developers to take advantage of MemberData, the ability to extend the property sheet further with your own goodies. VFP 8 doesn't have this feature. Yet when working with the two versions side by side, it always seems as though you can write in one and then produce in the other. This is almost true.
 
If you specify member data in a class in VFP 9 (and this can be done very easily using the add-ins provided on the Solutions Sample page), you won't be able to edit them in VFP 8. Instead, you'll get errors where VFP can't find the correct memory variables. The solution is to manually open the VCX or SCX file, find the Properties field with the memberdata in it and remove it.
 
At the bottom of the memo field, you'll see a line that says Name = "classname" but everything before it will be square boxes or binary data, just remove everything from the line that says _memberdata = and all the way down. Then you'll be able to open your class again in VFP 8 and earlier versions.
 
Yes, you will lose your Memberdata (like Favorites, and advanced editors, etc) but the value of cross-version compatibility is far greater, in my opinion.
 

Comments

Popular posts from this blog

Blogs and RSS come to Microsoft.com

MS has just introduced their portal and it's pretty comprehensive. Nothing quite like learning that some people use AIM instead of MSN messenger, or that there really may be a need for supporting 4 monitors ( Cyrus Complains ) However, it's really a great sign that MS is serious about supporting the blogging community which seems to have um, exploded in size in the past year. Blogs and RSS come to Microsoft.com

FoxInCloud Stats

FoxInCloud sent this link a while back about their statistics regarding visits to their site: http://foxincloud.com/blog/2017/12/27/VFP-community-lessons-from-foxincloud-site.html What's interesting here is the breakdown of people. Yes, I think it's understandable that the Fox community is getting older. Another factor is the growth of the mobile and web environments taking over development. These environments really do push people towards the newer non-SQL or free SQL/hosted environments but more towards hosted storage options like Amazon and Google. A tool like FoxInCloud that helps MOVE existing applications to the cloud inherently competes with those environments. But FoxInCloud also allows developers to extend their application further by giving them a starting point using Javascript and the basic CSS (such as Bootstrap). If you're not rebuilding your application from scratch, it's certainly a great step forward. FoxPro VFP

Facebook Revolt - imeem alternatives?

When Scoble noted how Facebook under major revolt , I immediately thought of a site I found yesterday. The value offered by Facebook's feeds however do seem very cool - if only they had been smart and made them opt-in, instead of opt-out. I have been impressed though with Facebook's opening of their API's - they certainly get it that they need to open it up to developers. I haven't really explored this other site, beyond my first look. In some ways, I think the whole social networking site thing is just silly , but this site (imeem) definitely showed some value. I could find music (as posted by the artist), it worked in Firefox and it allowed people to rank, add to delicious and more. And when I'm looking at someone, I can see what they're up to (or rather what they allow us to see). Anyways, you may want to check it out.