You can load the array in the Load method and it works fine.  Perhaps I
misunderstand the problem here.  I load my form property arrays in the Load,
set the RowSource property to the array at designtime, set the RowSourceType
to "Array" also at designtime, and everything works like a champ.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ken Dibble
Sent: Sunday, September 24, 2006 10:36 PM
To: [EMAIL PROTECTED]
Subject: Re: oop data entry form


>
>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)


I had a heck of a time figuring out the array RowSource issue. I figured, 
since the listbox or combobox Inits before the form Inits, that the 
controls wouldn't be able to see a RowSource array on the form. But that's 
not true.

So, if you add your rowsource arrays as properties to the form at design 
time, using the New Property option from the Form menu, the listboxes and 
comboboxes will see them. Make sure to specify the arrays as:

aMyArray[1]

If you call code to fill those arrays from the form's Init() method, the 
controls will be populated when the form appears.

Another option is to create a listbox baseclass that contains its own 
internal array rowsource. If you do that, though, you can't have it fill on 
Init() if you're depending on the form to call data into being, since the 
listbox will init before the form. My listbox class has a FillOnInit switch 
that I can turn on or off at design time depending on the circumstance. 
When .T., the listbox calls its own Fill() hook method when it inits. If 
I'm depending on availability of meta- or other data from the business 
object, I turn this switch off and have the form call the Fill() method 
when it (the form) is satisfied that it's got all its data.

Ken Dibble
www.stic-cil.org




[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