dbTalk Databases Forums  

VFP 7.0 form level array

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss VFP 7.0 form level array in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shah
 
Posts: n/a

Default VFP 7.0 form level array - 02-17-2009 , 10:35 PM






I need to declare a form level array so that it is available / visible
at all levels in the form.

How do I do that?

I read about declaring the array as a 'form property'. How do I do
that? I tried declaring it like any other form property - but it
behaves more like a property and not as an array.

Please HELP. I am having a hard time figuring this one out.

Shah

Reply With Quote
  #2  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: VFP 7.0 form level array - 02-18-2009 , 11:03 AM






shah <shahjagat (AT) aol (DOT) com> wrote:

You would be better off posting in
microsoft.public.fox.programmer.exchange as cdxf is effectively dead.

Quote:
I need to declare a form level array so that it is available / visible
at all levels in the form.

How do I do that?

I read about declaring the array as a 'form property'. How do I do
that? I tried declaring it like any other form property - but it
behaves more like a property and not as an array.

Please HELP. I am having a hard time figuring this one out.
Here is an example:

define class shah_example as custom

dimension formarray(10)

procedure init
for i=1 to 10
this.formarray(i)=i*i
endfor
return .t.
endproc

procedure getsquare
lparameters n
return this.formarray(n)
endproc

enddefine

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #3  
Old   
i79947@fake.uwasa.fi.invalid
 
Posts: n/a

Default Re: VFP 7.0 form level array - 02-19-2009 , 03:12 AM



shah <shahjagat (AT) aol (DOT) com> wrote:
Quote:
I need to declare a form level array so that it is available / visible
at all levels in the form.

How do I do that?

I read about declaring the array as a 'form property'. How do I do
that? I tried declaring it like any other form property - but it
behaves more like a property and not as an array.

Please HELP. I am having a hard time figuring this one out.
From VFP Help:

To create an array property
Add a new property to the form.

In the Name box of the New Property Dialog Box, type the name of the array property
and include the size and dimensions of the array.

For example, to create a two-dimensional array with 10 rows, you could type
arrayprop[10,2] in the Name box of the New Property dialog box.
--
JS


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.