- lookup(): add cAlias parameter
< > The use of an Alias is supported in ReturnField and SearchedField of LookUp(), but this feature is not documented. -- Guus Endeveld
- Export to newer version of Excel -- Update Export To command (as well as Save To command) to be able to export to a more recent version of Excel. Right now it only exports to Excel 5, and when open by a modern version of Excel, Excel will prompt to convert it to the newer format which sometimes confuses my clients. Although using Excel automation can do the job, but there are cases where using Excel Automation is an overkill or simply impossible, e.g. Excel is not installed. -- David Fung
- Copy to myfile.xls sheet 5 - so you can export to an existing file by creating a new sheet.
- COPY TO TYPE XLS MEMO - add the ability to output memo field content without having to use the much slower Excel automation method. -- df -- Thierry Nivelet shares this wish
- APPEND FROM TYPE CSV MEMO - add the ability to read memo field content out of a CSV file (or any other file format) -- df
- Increase Member Data size -- 8k is way too small. I don't even understand why the limit was necessary, because the description are stored in a memo file. You can go as much as you want. Member Data needs re-engineering totally - apart from the 8k limit it can't be used for development work intended for deployment in earlier VFP versions, as they have a 254 char property limit which breaks the code in a big way - ba
- Also, please increase the size of the Abbrev field in the FOXCODE table from its current 24 characters (this would allow for longer property names in global Member Data)
- Office XP/2003 style menu effects -- Enhance menu capabilities to enable construction of menu pads, popups and bars visually consistent with Office XP/2003 visual menu effects, i.e. gradiated image left border on popups, no borders on menu bar graphics, menu bar with border, gradiated system menu bar fading to right, etc. - mmg Allow this to be extended through the use of custom renderers and owner drawing.
- Ability to set .Picture for entire toolbar background -- Ability to set .Picture for entire toolbar background (without a border) to achieve toolbars with gradiated backgrounds (consistent with look and feel of Office XP/2003 toolbar backgrounds). - mmg
- XMLAdapter Enhancements ApplyToDiffGram() should be made to work for local and remote views without the need for an attachment to a Cursor Adapter. Performance needs to dramatically improve with respect to LoadXML() and ToCursor() on large XML result sets - if this is a result of an XML DOM Parser limitation, it needs to be overcome. A table in the table collection should be able to be referenced by it's alias (i.e. oXMLAD.Table("myTable")). jp
- Enumerators
Define Enum WindowState
Normal = 0
Minimized = 1
Maximized = 2
EndDefine
Thisform.WindowState = WindowState.Maximized
You can replicate this functionality with an Empty class as of VFP 8 -- John Koziol
For a cleaner language. I know I can. (What you are really asking for is STATIC class members. -- Colin Nicholls)
Yes and No. I am asking for simplicity:
#DEFINE WindowState_Normal 0 && old way / ugly
#DEFINE WindowState_Minimized 1
#DEFINE WindowState_Maximized 2
or
#DEFINE WindowState.Normal 0 && just a const with prefix/namespace / ugly too
#DEFINE WindowState.Minimized 1
#DEFINE WindowState.Maximized 2
or
Define Static Class WindowState && Static class member / kinda ugly but necessary
Static Const Normal = 0
Static Const Minimized = 1
Static Const Maximized = 2
EndDefine
or
Define Enum WindowState && Beautifully and clearly defined Enum. Winner
Normal = 0
Minimized = 1
Maximized = 2
EndDefine
I root for the last one.
- Booleans
Once and for all, make TRUE and FALSE keywords of the language.
Nothing uglier than .T. and .F.
Once there, make INKEY() codes also keywords like K_ESC for 27.
Enums will fit perfectly here too:
Key.Escape
Key.Backspace
Key.Enter
and so on
- SYS Functions
Give all SYS() functions a System.Descriptive name
System.TempFolder()
System.UniqueName()
* Note: now that we have namespaces ;-)
- DEFINE STRUCTURE
There is an Empty class. -- John Koziol
For a cleaner language. I know there is.
I don't understand what "cleaner" means. Different languages are different languages. Is "bonjour" "cleaner" than "Good day"? They both mean the same thing. Theres a way to do virtually any thing in any language. We just have to learn that language's idioms.
I've seen VFP code that interacts with C-whatever by creating a string variable full of spaces and positioning several terms at precise points within that string of spaces, then passing that variable to the C-whatever program, which reads the string as a structure. It didn't look that difficult to me, and certainly no more work to create than some several-dozen-line block of code that mimics a table--which is what a struct is.
If people want to program in C or Java, then program in C or Java. When you program in VFP, use that language as it was intended. Please stop trying to morph VFP into something that it's not.
-- Ken Dibble
Here is what "cleaner" means to me:
Instead of:
Dimension colors[3]
colors[1] = "Red"
colors[2] = "Green"
colors[3] = "Blue"
Do:
colors = Array("red","Green","Blue")
or
Instead of:
person = New Object("Empty")
Add Property(person,"Name","Britney")
Add Property(person,"Age",22)
Add Property(person,"DOBirth",{^2001/01/01})
Do:
person = Struct(Name="Britney",Age=22,Birthday={^2001/01/01})
I understand everybody has a different concept of what "cleaner" means.
I was just stating my very own. You have the right to disagree.
--- George Nava
Hmm.
This does not seem to be OO in any sense. Not that I'm an OO purist, though for some that might be objection enough. But I'm having trouble thinking of why it would be useful to be able to create such a complex thing on the fly. Surely a cursor would be easier and faster to interact with in most cases if you really needed that kind of data to persist for very long.
What is the scope of your struct? If it's local, why isn't this adequate:
LOCAL Name, Age, Birthday
Name = "Britney"
Age = 22
Birthday = {^2001/01/01}
If it's not local, why do you not want to encapsulate it? If it needs to persist in any sense or be generic, why is it not more useful to do this, once, in a file somewhere:
DEFINE CLASS Person AS Custom
Name = ""
Age = 0
Birthday = {}
PROCEDURE Init
LPARAMETERS cName, nAge, dBirthday
WITH THIS
.Name = cName
.Age = nAge
.Birthday = dBirthday
ENDWITH
ENDPROC
ENDEFINE
And then, whenever you need it:
oPerson = CREATEOBJECT("Person","Britney",22,{^2001/01/01})
Here you have a neat package that can be passed from one procedure to another, is as easy to read information out of as a struct, can be modified (subclassed) to include additional data items on the fly, and to which you can easily attach a Set() method to automate its collection of data.
or
CREATE CURSOR Persons ( ;
Name C(20), ;
Age N(3), ;
Birthday D )
And then when you need it:
INSERT INTO Persons (Name,Age,Birthday) ;
VALUES ("Britney",22,(^2001/01/01})
The latter is not much harder than creating a struct and has the great advantage of being sortable, query-able and accessible from anywhere in your program.
VFP is as powerful as many other languages--if used correctly.
(I won't argue, by the way, that it wouldn't be useful to have a "more empty" baseclass than Custom, but "less empty" than Empty--because we need that Init() functionality. In fact, I also won't argue that it wouldn't be nice to be able to create our own base classes from scratch and pick and choose VFP native functionality to add to them using something like the C# "Implements" concept. OTOH, the significance of the extra "weight" of something like Custom is really quite negligible in most situations. I've got code that constantly creates and destroys some quite large and complex Custom-based objects without any noticeable performance degradation.)
(And, while we're at it, I also won't argue against inline declaration/assignments--ie. "LOCAL foo = 'bar', grotz = 30, felch = {^1492/10/12}"--either.)
You're right, of course. It's mostly a matter of personal coding style. I think the gist of my message about this stuff is: Please, while adding enhancements, do not dilute the power of the language's xbase roots, do not weaken its truly unique and intuitive OO features, and especially do not take steps that would lead, in future versions, to deprecating these things and relegating them to "included for backward compatibility" status, purely to satisfy what are, in my opinion, largely stylistic fads in programming and not truly performance-enhancing features.
-- Ken Dibble
Define Structure Person
Name="Britney"
Age = 20
Hired={2004/01/01}
isActive=True
EndDefine
? Person.Name
If Person.isActive Then...
OR
- DEFINE CLASS AS EMPTY
Define Class Person [As Empty] // assume empty if no class specified
Name="Britney"
Age=20
Hired={2004/01/01}
isActive=True
EndDefine
For lightweight objects
- ARRAYS and STRUCTS
Inline definitions of arrays and structs
colors = Array("red","white","blue")
person = Struct(name="Britney",age=20,isActive=True)
* or
colors = NewArray("red","white","blue")
person = NewStruct(name="Britney",age=20,isActive=True)
? colors[1], person.name
and revisions for
LOCAL lcColor = "blue"
i.e. able to create and assign initial value to a local variable at the same time.
and allow for aArray(0)
SET ARRAYBASE TO 0|1 && with local scope, would be very interesting
or
Dimension myArray[9] Base 0 && ugly, I know
- Since backwards-compatability seems to always be a huge priority for the Fox team, improving Arrays to be zero-based is a non-trivial task to achive in an elegant manner, so why not just add a new kind of memory variable that just does it right, but is still accessable like an array? Call it a "list" type, let's say. One which is always passed by reference (copies would result only from list slicing), which uses zero-based indexing, and provide
ListToArray() and ArrayToList() functions. -- Peter Crabtree
- Python-like list slicing on strings and lists -
myString[3:-1] is far cleaner than Substr(myString, 4, Len(myString) - 4), and I don't even want to consider how many lines myString[3::-1] would take in VFP. -- Peter Crabtree
There's an off-by-one-error: Substr(myString, 4, Len(myString) - 3)
substr(myString, 4) will do the same.
That's not an error, and this is an example of why I want list slicing - the current system makes off-by-one errors so very easy. Substr(myString, 4, Len(myString) - 4) is exactly what I meant - that is, return the string, beginning from the fourth character, minus the last character. This is just an example, of course, but I very, very often find that I have to do similar things. A simpler example would be:
Left(myString, Len(myString) - 1)
vs.
myString[:-1] -- Peter Crabtree
- Data type classes
Take a cue from DotNet
and Java and provide intrinsic classes for the various data types. This could also be an avenue for using strong typing in VFP without breaking backwards compatibility. The DotNet
object model could be used as a guideline, and class methods could make use of existing VFP functionality where possible. This not only brings a modern element to the language, but makes it easier to use for other developers that aren't familiar with VFP. -- Joel Leach
Local loMyString as StringObject
loMyString = CreateObject("StringObject") && not sure if this is required
loMyString = "This is my text."
loMyString.ToUpper() && calls Upper()
loMyString.PadRight() && calls PadR()
loMyString.Replace() && calls StrTran() or applicable function
loMyString = 10 && fails at compile time/runtime
Sorry, what why would VFP want to take a cue from .NET and Java with respect to data handling. Data handling is the weak point of those languages. The strength of VFP is it's cursor technology and all that revolves (e.g. data binding) around it. .NET and Java need to take cues from VFP.
Perhaps I wasn't very clear, but my suggestion has nothing to do with the data/cursor handling. Rather, I'm talking about adding native classes for variable data types, not fields in tables. VFP has always kept up to date with its language, and I think this would be a valuable improvement that other modern languagues enjoy. FWIW, I agree that VFP's data handling is superior, and my understanding is that the DotNet
teams are taking some cues from VFP in this regard. -- Joel Leach
No way, Jose (or Joel as the case may be). While that stuff works great in .Net, I can't see doing that in VFP without major problems for legacy applications. Not to mention it would require immense and risky changes to the VFP engine. -- John Koziol
- Typed properties
Provide a way to associate a property with a class definition using either a language construct or Member Data. Currently, there is no way to get IntelliSense from a property that is an object. IOW, typing This.oMyObject. doesn't trigger IntelliSense. -- Joel Leach
- Ability to create objects and call procedure/functions which its vcx/prg file already added into active project manager without the need of SET PROCEDURE / SET PATH TO in VFP IDE. It would make debugging in design mode easier.
- Ability to create a class without a class library and without SET CLASSLIB TO. A .PRG can be called directly without SET PROCEDURE TO. I should be able to oObject = Create Object("someclass.vic") where the .vic (visual class as opposed to visual class library) has the same structure as a .vcx, BUT does not support containing multiple classes. That would let the existing designers work. This would reduce the arbitrary grouping of classes into classlibraries. It would mean a particular exe would only contain the classes (and their parent classes) that are used, as opposed to containing also unused classes! -- Mike Yearwood
- SET CPUHog ON | OFF | nPercentCPUUseAllowed ok so a better name is in order, but I think this one states the problem better...
VFP needs to have a SET or sys() call that can be made to allow VFP to cooperate with other running tasks on a machine. There are two classic examples of where VFP's performance-at-all-costs mentality makes VFP fall flat. Long running SQL-SELECT executions and while waiting for long running synchronous SQLExec() results. When these operations happen on a fat-client VFP app or from inside a COM object used on a web server little other work can be accomplished on the box. TaskMan shows the VFP program as non-responding, which has probably caused more than a few needless End Task kills of the app. VFP needs a mode to give up CPU cycles and respond to Windows messages while these long running commands are executing. Losing a couple of percent execution speed on a SQL statement is an acceptable tradeoff if it means that a whole website will not go non-responsive or that a user can switch over to Word and be more productive while a VFP task is cranking away in the background. Currently we have a work around for
this fault by using a second machine which takes report query requests from a queue and processes them in an offline manner. -- ?df