Hey there Mike - thank you SO VERY Much for this help - and pointing me
in the right direction. Its oh SO Helpful. As always - the ProFox list
COMES Thru when needed the most. I shall definitely hit the HELP file as
you suggested for any additional explanation on the coding.

One thing though. When you wrote "... only registering the controls that
you really want to scan/check/work-with." You do understand that it's a
Completely NEW screen/Form I am creating. And, as such - I will be using
ALL the Controls that I place on the Form. The trick is making this Form
so that it works both within the OLDER FP for DOS type system, as well
as in the new true VFP system w/graphical screens. And, just so you know
- its strange how they made their old system supposedly a VFP Windows
system by just using Blank Forms and running the OLD Code inside of
those forms. Which, is actually kinda the trick I am doing with this
project as well  - but, differently. Since, I am making ONE Form (to
rule them all) - that is going to get called from the OLD VFP 7 system
(and the old code will run within it for look-ups - which means I DO NOT
have to Re-Write all the Data look-ups code) and will also get called
form the New Graphical system running under VFP9 (and, for that one - it
will call Alternate code for Data look-ups, which are actual
forms/classes designed within VFP9). 

My initial tests have actually worked - and I showed a couple of my QA
Tech's here, how it functions - since they are the ones that install the
stuff for the clients. They were also pretty impressed that I got the
trick to work.

Mike - I may e-mail you directly - off list - just so you can see what I
managed to do. Send you a couple of screen shots. Since, of course,
screen shots can't be posted here on the list...

Again - thanks for all your help - and spending the time to also show me
some code examples!!!

L8r,
-K-

-----Original Message-----
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com]
On Behalf Of MB Software Solutions, LLC
Sent: Wednesday, June 20, 2012 6:16 PM

On 6/20/2012 5:57 PM, Kurt Wendt wrote:
> Why you'd use @SAY/GET in VFP7??? I didn't use it! Its an old, OLD
> system - starting way back as Foxbase+ or FP for DOS. I didn't build
it
> - I only support it - and add new features. Many times - if it's a
> completely new screen - I will actually make it graphical as a Form.
>
> The idea of using " FOR EACH oObject in thisform.Controls " sounds
> exactly what I was looking for. Any place you can point me to in the
> Help files for more specific details? As I've definitely not ever done
> that particular type of code before...
>
> Thanks again,
> Kurt


Check out the FOR EACH in VFP Help.  It's in there.  Likewise, you 
should consider putting something in the Init of your classes used in 
the form so that you're only registering the controls that you really 
want to scan/check/work-with.  That avoids you cycling through tons of 
controls for no reason at all.  There's a pattern name for that but it 
escapes me at the moment.

For example, in your txtKurt.Init class method, you'd have the following

code:

if this.lRegister then
   thisform.AddToCollectionToCheck(this)
endif

And of course that means you'd have a custom property called lRegister 
that you set to .T. if you cared about that object on the screen being 
included in your check/work-with-it routine.  Then in your frmKurt form 
class, you'd have a custom method called AddToCollection that received 
the object as a parameter and added it to the form's collection (using 
some custom property like oControlsToCheck that was a collection
object).

Then when you needed to work with those controls that you really cared 
about, you could cycle through that collection.  example:  FOR EACH 
oObject in thisform.oMyControls

This is all out of my head, but I think it should work.

(And yes, I still prefer the old Hungarian notation for form property 
names.  Insert mockery here!  lol)

-- 
Mike Babcock, MCP

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/289ea162f5642645b5cf64d624c66a140e260...@us-ny-mail-002.waitex.net
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to