variable trouble

Andrew Kluthe andrew at ctech.me
Thu Sep 25 19:38:41 EDT 2014


Larry,

I'd try copy and pasting some more of the code around it and we can try and
figure out what you are trying to accomplish.

Andrew
On Sep 24, 2014 2:10 AM, <larry at significantplanet.org> wrote:

> Hi Scott,
> I meant to say "inexplicable to me."
> Your solution works great.
> However, I cannot figure out the next part:
> I want to put the value of thisKey into a variable when it matches.
> So I tried a few iterations of:
>
> put value(thisVar[thisKey]) & space after newVar
>
> but could not get anything to work - with the parenthesis in different
> places.
>
> Do you know the syntax for adding the bracketed thisKey ??
>
> Thanks,
> Larry
>
> ----- Original Message ----- From: "Scott Rossi" <scott at tactilemedia.com>
> To: "LiveCode Mail List" <use-livecode at lists.runrev.com>
> Sent: Wednesday, September 24, 2014 12:28 AM
> Subject: Re: variable trouble
>
>
>  Hi Larry:
>>
>> Your situation is very explicable.  In your script you're treating
>> "thisVar" as an array, instead of accessing the array that you put into
>> thisVar.  You're trying to use one variable to refer to another.
>>
>> If I understand the result you want, one way would be to use the value
>> function, to retrieve the data of the array stored in thisVar:
>>
>> put "wgList0" & N into thisVar
>>
>> put the keys of value(thisVar) into theseKeys
>>
>>
>> Hope this works for you.
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX/UI Design
>>
>>
>>
>>
>> On 9/23/14 11:07 PM, "larry at significantplanet.org"
>> <larry at significantplanet.org> wrote:
>>
>>  Hello,
>>>
>>> I'm using 6.6.3 on Windows XP.
>>>
>>> This line of code works just fine:
>>> put the keys of wgList03 into theseKeys
>>>
>>> but the following lines of code do NOT work: (where N is 3)  -- and yes,
>>> it IS a ZERO after wgList
>>>
>>> put "wgList0" & N into thisVar
>>>
>>> put the keys of thisVar into theseKeys
>>>
>>> To me, this is just inexplicable and very frustrating.  Any help will be
>>> greatly appreciated.
>>>
>>> Thanks,
>>>
>>> Larry
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list