All the function is doing is counting the number of words by "spaces". You could create a function:
FUNCTION GETWORDCOUNT
PARAMETER lcString
lnWordCount = AT(" ",lcString)+1
Return lnWordCount
The reason for the +1 is the last word doesn't get counted because it will have a "." at the end...
Hi Steve,
No, but you can use WinHTTP com object.
I use this to interface with OpenAI GPT-4o.
ChatGPT suggests this approach:
LOCAL oHTTP
oHTTP = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")
* Obtain the OAuth token
oHTTP.Open("POST"...
SitesMasstec,
I think you mean
SET EXACT ON
SET EXACT = ON
Will generate an error.
You should save the current state first with:
llExact = SET("EXACT")
And if you are changing it's state, you should capture the current state first, SET EXACT ON (do your code) then issue: SET EXACT (llExact)...
EinTerraner....
You're kind of breaking my brain here. I don't understand the question in the context of the example. Your example clearly already has a "sub-classed, base class", and in one tab you are showing all properties, in another you are showing favorite. You can make any property a...
Just sub-class the VFP classes.
The way you do that is, open the class, resave it with a new name into a class library like "girdbase".
Then open the class, right click the property/method you want and "Add to Favorites".
Now when you place that object on a form, the favorites will be there...
Hi SitesMasstec,
I use this same control, but I create the "Illusion" of a dropdown. The Ole control appers on the form only as the "drop down" for the combo. When you click it, the Ole calendar appears.
When you select a date with it, the calendar OLE Date picker pops up:
You pick a date...
Couple of things you can do.
One, SET STEP ON before WITH, and then check the value of the variables/constants as you step through, and it will tell you what value is actually contained in ThisForm.dtSaida.Value (you can also check the value of YDATASAIDA is.
OR, if you're concerned that...
I have used a combination of EZTWAIN (for getting images from scanners/cameras) and TOCR which have been excellent products, and reasonably easy to integrate. Recently I have been toying with OpenAI and image processing, but it seems to be early days, though they are advancing quickly with it...
mmerlin,
Don't know if you are still here as this thread has gotten unnecessarily long, but if you've made your way to page 2, I can now shed some light on this.
I am assuming you are using the screen builder within the IDE of FoxPro for Windows. When you "build" the app, what it actually does...
Rajesh, look at how the "MoveHere" works. This is likely utilizing Windows level call (whether you realize it or not). If you change how that works, then you can make this dialog disappear. But you aren't showing me the code, so I can't help you.
What instruction in the code results in this occurring?
Also, what is the state of the following:
SET TALK
SET SAFETY
SET NOTIFY
You can put in something like the following:
MESSAGEBOX("SET TALK =" + SET("TALK"))
... etc.
And it will give you the state, without SETTING STEP ON, which can...
The OP mentioned they are free tables. (Well, he said "They are not part of a DB", so I assume he meant they are not part of a DBC.
That said, I use essentially this process all the time. I have one table that is prone to corruption because it gets used in a process where images are scanned...
If you don't have an ENDTRY you should be getting a compiler error.
It's like having an IF without an ENDIF or a CASE without and ENDCASE.
There is no such thing as an implicit ENDTRY.
Hi Chris, while I don't disagree with you, isn't that a form of corruption???
I was just looking for a single ubiquitous term, since my "fix" doesn't care what the error specifically is.
Well it's all small data, so what you could do is any time you reprocess this with reordering the set of records, is to rebuild your index.
I would suggest DON'T do this with REINDEX, rather what you have above.
The indexes are both compound, and risk not being able to create a unique ID (what...
What indexes exist on the table? Are they compound? Are they creating a unique index?
How big is the table?
Also, why are you doing it this way?
Can you explain what you are trying to achieve (what your business logic is in this case)?
Hi mmerlin,
I found some "old code" in a screen that I have (since I don't have FP installed on this laptop I'm working from, I remembered I can open the screen as a DBF, so I did).
I found that in one of my "DO SHOWGETS" procedures (which is part of the screen codec that can be called at any...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.