Hi Dave,

I have a form call frmpoship and call with

DO FORM frmpoship WITH laDates, ...

in the form INIT is:
PARAMETERS aShipdates,....

DIMENSION thisform.aShip[8,9]
DIMENSION thisform.aShip2[8,9]
ACOPY(aShipdates,thisform.aShip)
* make second copy to see if anything has changed
ACOPY(aShipdates,thisform.aShip2)

The array size is fixed but the acopy should size it anyway.
aShip is already set up in the form under form/edit property/method, so I don't need to add it. It might be this bit that is tripping you up. When you have your class open click on class edit property/method and it should be at the end of the list, like myarray[1,0]

Presume you just use this.aShip[8,9] etc instead of thisform
Also at the end (closing the modal form) I just hide the form and check the values of the array before releasing it.

Peter


On 24/11/2015 13:33, Dave Crozier wrote:
Peter,
That is fine but it is getting the external array to be recognised within the 
class that is the problem. Once I can do that then the aCopy() will work fine.

You have said that in one of your forms you pass an array. What do you pass it 
to, I want to pass it to a visually developed class where I can then copy it to 
an array owned by the class and manipulate it accordingly.

I am just going around in circles here at the moment and beginning to think 
that I have missed something really basic.

Dave

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Peter Cushing
Sent: 24 November 2015 13:29
To: [email protected]
Subject: Re: Array passing Suggestions...

Dave,

When working in a class don't you use this.aArray ?
Just checked one of my forms and I pass an array and then use ACOPY like Tracy 
suggested.
I would also set up the array in the class before it is run so you don't have 
to addproperty etc.

HTH


Peter Cushing
IT Department
WHISPERING SMITH


On 24/11/2015 13:25, Dave Crozier wrote:
Tracy,
Not of help as you can't Acopy() inside the object because:
1. if you want to aCopy the Thisform.aArray it doesn't recognise the Thisform 
part of the statement.

2. If you do the aCopy before you do the assign to the Object Property then you 
are in the same situation as when you started because the copied array gets 
sent in as only the first element once again and cannot be passed in with the @ 
sign as the destination is a property and not a UDF.

Racking my brains here to think out a solution or even a work around!!

I use objects to pass parameters into a udf() or Screen etc. many times but 
this is the first time I have wanted to pass an array.

I am now examining using a collection as opposed to an array but to be honest I 
don't really want to go that way, but if all else fails...

Dave


-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Tracy
Pearson
Sent: 24 November 2015 13:12
To: ProFox Email List <[email protected]>
Subject: Re: Array passing Suggestions...

ACopy() comes to mind.

On November 24, 2015 7:44:54 AM EST, Dave Crozier <[email protected]> wrote:
I have a class that needs to be sent an array from the calling program.
What I want to do is ideally pass the array in as a property and use
the property _"Assign" method to process the array internally. I have
tried passing the

Thisform.AddProperty("aArray[2,2]", null)

Thisform.aArray[1,1]= "Item 1"
Thisform.aArray[1,1]= "Item 1,2"
...


Class.Property=Thisform.aArray


The above coding only results in the first element being passed ....
as in what is done to a UDF and I have tried passing it with an @
sign (as you would with a UDF) at the front but this gives a syntax
error so no go there. I have also tried calling the Property_Assign
method direct but using the array with a leading @ sign but the
mainline doesn't have visibility of the _Assign method so no go there.

Short of setting up a new Receive_Array() method on the object and
passing in the array with an @ sign I can't seem to come up with an
alternative solution and I haven't tested out that you can even do
this as of yet.

Any ideas guys?

Dave
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[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.

Reply via email to