sending arrays to objects

Mark Smith mark at maseurope.net
Wed Nov 22 05:33:59 EST 2006


Thanks, what I've done in this case, because the object concerned  
only ever has to deal with one array at a time, is to set a cp in the  
object from wherever, and then send a "checkCP" message to it to do  
what it needs to do with the cp.
Two lines as opposed to one, but not the end of the world...

Best

Mark

On 22 Nov 2006, at 09:25, Dave wrote:

> Hi,
>
> I do this a lot. The way I worked around the problem was to pass a  
> string containing the address of a cp (usually in the stack or  
> card) which contains the array.
>
> Works quite well and is faster then sending the whole array. On the  
> down side it's a bit clumbersome to use.
>
> All the Best
> Dave
>
> On 19 Nov 2006, at 13:21, Mark Smith wrote:
>
>> I'm building yet another table object, and I want to pass data to  
>> it in the form of an array, like so:
>>
>> send "importArray tArray" to group "tableObject"
>>
>> The script of the "tableObject" group has:
>>
>> on importArray tArray
>>   put tArray into sData -- sData is a script local variable
>> end importArray
>>
>> This fails, though without an actual error - the sData variable  
>> remains empty.
>>
>> I tried using a dummy setProp handler:
>>
>> setProp tableData tArray
>>   put tArray into sData
>> end tableData
>>
>> but this fails also (I didn't really expect it to work).
>>
>> Of course, I could just set a customPropertySet of the  
>> tableObject, but I was intending to do some checking of the data  
>> before accepting it and placing it in the sData variable.  
>> Actually, I suppose I could set a customPropertySet and then send  
>> a separate message to the table object that would cause it to  
>> check the customPropertySet...so I guess I've answered my own  
>> question!
>>
>> Still, has anyone come up against this before, and found a neat  
>> way to do it?
>>
>> Thanks,
>>
>> Mark
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list