In the class def for your form set bindcontrols = .f. The load event should be 
fine for a form.<property> = createobject("empty") and
Addproperty() as much as you need. The control sources can all be set to the 
properties of this object. Then in the form's init set bindcontrols = .t.  I'm 
not too sure how oop'y load events and data environments are, however. VFP is 
built to put the cart before the horse in this respect imo.
-Lew 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Davies
Sent: Wednesday, September 20, 2006 12:52 PM
To: [EMAIL PROTECTED]
Subject: oop data entry form


Hi,
I am trying to build a small app using some oop (moral 1 don't try to be too 
clever) and I'm having a couple of problems (moral 2 never build from scratch - 
always start with something that already works):-

I want to create a data object to hold the input (define class mydata - var1, 
var2, ...) but where do I define it? (I can't use the form.load or the 
de.beforeopen which seemed like good places)

also in the form.load I create some arrays and a cursor to hold values for 
listboxen &c. on the form, but where do I set the rowsource properties - if I 
set them directly in their control properties or programmatically in the 
control's init the arrays aren't yet in scope same for the controlsources which 
I want to bind to properties of the data object (when I get one)

Andrew Davies  MBCS CITP
  - AndyD        8-)#


**********************************************************************

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

Please contact [EMAIL PROTECTED] with any queries.

**********************************************************************



[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** 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