I've noticed that as well - ACOPY() will redimension the the target array if 
the arrays are public or private variables. It doesn't always work with arrays 
which are object properties - it's safer manually to redimension the object 
array to match the input.

Laurie




________________________________
 From: Dave Crozier <[email protected]>
To: ProFox Email List <[email protected]> 
Sent: Wednesday, 21 August 2013, 17:04
Subject: RE: ACOPY()
 

Kent,
This works...

ThisForm.AddProperty("aArray[1,1]",null)

dimension aTemp[1,10]

aTemp[1,1]="1,1"
aTemp[1,2]="1,2"
aTemp[1,10]="1,10"

Acopy(aTemp, ThisForm.aArray)

The array aArray gets redimensioned in the aCopy to [1,10]

Dave


-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Kent Belan
Sent: 21 August 2013 16:51
To: 'ProFox Email List'
Subject: ACOPY()

Hello,

I don't work with arrays that often, but I need to now and am having trouble.

I created a form property for the array thisform.aEyeColor[1,2]

I make a call to a business object to pull a query from the codes table and 
return and array.

The problem is when I try to copy the returned array into the form.property I 
get an error.

Private a_temp
Dimension a_temp[1,2]

oCodes.GetCodes('EYECOLOR', @a_temp)

this returns the array correctly into the a_temp variable

the problem is when I try to copy the array to the form variable

ACOPY( a_temp, thisform.aEyeColor)

I get the error "subscript is outside defined range"  

Does anyone know the trick to get this working ?

Thanks,
Kent


[excessive quoting removed by server]

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

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

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