Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloads
Search: 

Encapsulate the SYS() and SET() as methods
Greg Reichert, GLR Software
This object encapsulates the SYS() and SET() functions in methods of a class. This allows the developer to use these function by named instead of sum number. Plus it provides more readability of the source code. 12/15/2005: Included classes the encapsulate the SysMetric(), FontMetric(), Home(), and OS() functions as named methods.
Created on
19 years ago
Downloads
894
File type
Freeware
General information
Description
I throw this class together because I was struck by a wish from the VFP ver 10 Wish List at http://fox.wikis.com/wc.dll?Wiki~VFPVersion10WishList~VFP. I took the idea and extended to not only the SYS() function, but also the SET() function. PUBLIC System && declare variable like a NameSpace. m.System = System() && Create the Object *- Get a new Unique Filename NewFile = System.LegalFilename() *- Set a new value and save the last old value. OldBlockSize = System.Set.BlockSize( 10000 ) ... *- reset the last old value System.Set.BlockSize( OldBlockSize ) 12/15/2005 Included classes that encapsulate the SysMetric(), FontMetric(), Home(), and OS() functions as named methods.
Created by
Greg Reichert, GLR Software

Comments
Attention: this class don't and can't support datasessions!
PUBLIC System
System = System() && Create the Object

s2=CREATEOBJECT("session") && create datasession 2

set datasession to s2.datasessionid  && enter into 2
? SET("Datasession") && 2
? System.set.dataSession() && 1 !!

* and it is impossible to wrapper SET DATASESSION TO  into a class

? System.set.dataSession(1) && this change the datasession of System only
? SET("Datasession")  && still 2
then it is useless. Fabio Lunardon, December 17, 2005

Fabio, I appreciate your input. You are right about the scoping of the DataSession method of the class. When I put the class together, I ran a simple smoke test on it. I am embarrassed that this escaped me. I have comment out the DataSession method, and posted the updated. I am sorry for any inconvenience I may have caused you, or anyone. But, I believe the term “useless” is a bit harsh. Greg Reichert, December 21, 2005

Greg, you have not gathered the point. Every SET or SYS() that it depends on the datasession their cannot work, to work exists two solutions only: 1. to pass as parameter the current datasession and to use SET DATASESSION in all the class methods 2. the VFP developer has to create an VFPSystem object for every datasession created from the application (with an array or a collection). Example:

CLEAR
PRIVATE VFPsystem
VFPsystem=CREATEOBJECT("VFPsystem")

WITH CREATEOBJECT("Session")
	SET DATASESSION TO .DatasessionId
	? "Current ",SET("TALK")
	? "change set TALK to ON, return ", VFPsystem.Set.TALK("ON") && Bad
	? "Current ",SET("TALK")
	? "current via VFPSystem ",VFPsystem.TalkSetting() && Bad
ENDWITH
You have to change all these set
SET ANSI
SET AUTOSAVE
SET AUTOINCERROR
SET BLOCKSIZE
SET CARRY
SET CENTURY
SET COLLATE
SET CONFIRM
SET CURRENCY
SET DATABASE
SET DATE
SET DECIMALS
SET DELETED
SET DELIMITERS
SET EXACT
SET EXCLUSIVE
SET FIELDS
SET FILTER TO
SET FIXED
SET HOURS
SET KEY
SET LOCK
SET MARK TO
SET MEMOWIDTH
SET MULTILOCKS
SET NEAR
SET NULL
SET POINT
SET REPROCESS
SET SAFETY
SET SECONDS
SET SEPARATOR
SET SYSFORMATS
SET TABLEPROMPT
SET TALK
SET UNIQUE
SET VARCHARMAPPING
SYS(7)
SYS(21)
SYS(22)
SYS(103)
SYS(2001, cSETCommand [, 1 | 2])
....
Besides this class can to be reentrant respect to of the Timers in a multisession application only if every method, before to exit, restore the datasession. Honestly it seems me that the complication overcomes the simplification. Fabio Lunardon, December 24, 2005

Add a comment
More downloads created from this member
Greg Reichert, GLR Software
Image be able to manage an array (or any list of data) using a SQL statements. Well with this little tool you can. Query allows you to select, update, delete, and even insert data into array, collection, cursors, file directories, most any list of data. And it can be extended too. Yes; you can cr...
Created on
17 years ago
Downloads
2193
File type
Freeware
Rating
5.00/5.00
Greg Reichert, GLR Software
I would like to indroduce a new utility from the on going series of LifeCycle. FUnit is a NUnit like utility for unit testing and coverage analysis for object orientated applications. You write you test cases in the method that will be tested. Then run the FUnit utility. It will scan the application...
Created on
17 years ago
Downloads
539
File type
Freeware
Rating
5.00/5.00
Greg Reichert, GLR Software
Automatally closes a form after N seconds of inactivity from the user. Based on Timer class and monitors the current position of the cursor and mouse. Just drop the control on any form, and set the desired duration of the delay.
Created on
18 years ago
Downloads
2154
File type
Freeware
Greg Reichert, GLR Software
The purpose of LifeCycle - Build Phase utility is to provide a central application to automated as much of the built process as possible without have to clone code, or replicate the procedure for different projects. It also provides the means to schedule automated builds for daily builds. The util...
Created on
18 years ago
Downloads
599
File type
Freeware
Greg Reichert, GLR Software
AuthCode, or Authentication Code, is an add-on form that makes the application into an evaluation copy type. The user can use the application until either an expiration date or count runs out, or they have registered it by entering an authentication code. At which time the application will stop aski...
Created on
19 years ago
Downloads
2562
File type
Freeware
Rating
4.00/5.00
Greg Reichert, GLR Software
This tiny control resizes controls on forms. Just drop this control on any form. Set the TAG properties of the controls you wish to resize to a combination of T,L,H,W. And place a Thisform.Refresh() statement in the form's Resize event. That is all there is to it. Now work properly in VFP 6.0.
Created on
19 years ago
Downloads
2506
File type
Freeware
Greg Reichert, GLR Software
Multiple Project Hooks is a ProjectHook class that allow for chaining more then one projecthook class per project manager. If you have different projecthook class that do different tasks, and you want then all to be a part of the current project you are working on, you normally would have to combin...
Created on
19 years ago
Downloads
627
File type
Freeware
Greg Reichert, GLR Software
This routine uses Google's spelling correction feature of their search engine to perform spell checking. When a mis-spelled word is submitted, Google attempts to correct the spelling and persents it as a phrase near the top of their result page. The corrected phrase is always after the term "Did y...
Created on
20 years ago
Downloads
671
File type
Greg Reichert, GLR Software
The purpose of this application is insure that the local copy of the application, and it dependent files, are always up to date. The remote copies of the application can be located either on LAN/WAN server, HTTP web server, a FTP site, or even a Email attachment. In addition, the AppStart can instal...
Created on
20 years ago
Downloads
2424
File type
Greg Reichert, GLR Software
This control is a simple treeview using the WebBrowser control and a HTML file to drive a VFP form. The tree itself is a standard html outline using the "UL"/"LI" tags. What make this the simplest, is that the only one OnClick event is established, and that is at the first (or root) "UL" tag.
Created on
20 years ago
Downloads
3005
File type
Rating
5.00/5.00
Greg Reichert, GLR Software
This object, when dropped on a form, automatically sets the colors and other properties of all the controls on the form to those that match the same properties on the Style object. Set the properties value once on the Style control, and when the form is ran, then all the controls with the same prop...
Created on
20 years ago
Downloads
1571
File type
Freeware
Greg Reichert, GLR Software
The Locale class automatically translates captions, tooltips, and statusbar text from one language to an alternate language with the use of the internet, then stores the translation for future use and faster translations. Now with 8 languages and uses 11 web-sites for the best and fastest possible t...
Created on
20 years ago
Downloads
2236
File type
Greg Reichert, GLR Software
Monitor and remotely terminate running application from across the network. Great for those times you need to force users out of applications they have left running. Also, the administrator can check for dead applications or those that are reporting they are in a critical section of the program, lik...
Created on
20 years ago
Downloads
4146
File type
Freeware
Greg Reichert, GLR Software
Have your clients ever ask to have their forms remember their position and size? This neat little control does just that. Now works with VFP 9.0 Anchors. Just drop it on any form, and it will remember its position and shape. The properties are saved in the registry for each user that can log on ...
Created on
21 years ago
Downloads
2088
File type
Freeware
Greg Reichert, GLR Software
Link update only. Have you ever needed a Mover control, but space is limited. This control provides many of the same features as the Mover control, but all in the same space of a single listbox. There are several different demos of this in the download. Also, a couple of the demos use a slider con...
Created on
21 years ago
Downloads
1973
File type
Rating
5.00/5.00
Greg Reichert, GLR Software
Link adjustment only. Auto hide any form behind the VFP desktop, pop it back out when the mouse is hovering over it. The AutoHide class can be dropped on any form to provide the ability for the form auto hide itself behind the VFP border. This is similar to other autohide feature found in windows d...
Created on
21 years ago
Downloads
2244
File type