sending arrays to objects
mark at maseurope.net
Sun Nov 19 09:25:36 EST 2006
Exactly. I wonder if it's worth putting an enhancement request (I
wouldn't call this a bug) in bugzilla.
I was hoping to be able to pass the array simply, without having to
do anything to it in the "client" handler, but for now, I'll just
work with it as you and jbv suggest.
On 19 Nov 2006, at 14:18, Andre Garzia wrote:
> that happens the send call will accept only strings, when you put
> an array as parameter for that call, it is treated as a string and
> then it is empty. I am by no means expert on the subject of
> programming language implementations and xTalk Internals Heraldry
> but I think that arrays are special states of variables and since
> in Rev all variables can be treated as a string container, then
> many calls and commands try to treat its params as string but when
> arrays are used, this special state cannot be represented as a
> string value and thus it become empty.
> I use XML snippets for those sittuations or split/combine using
> very strange delimiters that I know no sane man will use.
> On Nov 19, 2006, at 11:21 AM, 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
>> Still, has anyone come up against this before, and found a neat
>> way to do it?
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode