Q re. declaring arrays for forms 
Author Message
 Q re. declaring arrays for forms

Could someone suggest me the correct way in VFP6 to initialize arrays
controlling List or Combo boxes in form.

So far I am doing it by declaring array in form's calling procedure or
as Public in Load event to avoid "not an array" error message when
form is opened for the first time.

The obvious reason for this is that arrays and variables fall out of
scope once event procedure is finished.

In FP 2.6 #Section Setup code could be used for initialising arrays
which are "global" to form. Is there some solution in VFP?

Thanks

Gunnar



Tue, 04 May 2004 18:14:09 GMT
 Q re. declaring arrays for forms



Quote:
> Could someone suggest me the correct way in VFP6 to initialize arrays
> controlling List or Combo boxes in form.

> So far I am doing it by declaring array in form's calling procedure or
> as Public in Load event to avoid "not an array" error message when
> form is opened for the first time.

> The obvious reason for this is that arrays and variables fall out of
> scope once event procedure is finished.

> In FP 2.6 #Section Setup code could be used for initialising arrays
> which are "global" to form. Is there some solution in VFP?

In VFP, you add an array property to your form.
Form properties are available to all methods of the form.
You can initialise the array in the form's init method and use it in any
other method.

Christian Desbourse (Belgium)



Tue, 04 May 2004 19:29:13 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Declare ARRAY

2. Declare an array variable

3. declare variable as array

4. How to declare an array in SQL Server

5. How do I declare an array?

6. Creating a small declared Array

7. Declaring Global Arrays from Load_Form

8. ProC Declaring host arrays in a separate class

9. Declare cursor for Put with array

10. Declaring Arrays in Embedded SQL

11. DECLARE array and Init Method

12. Object arrays and Closing Forms (Proportionally resizing forms)


 
Powered by phpBB® Forum Software