is there a better way to do this?

Claudi Cornaz claudi.c at fiberworld.nl
Tue Jun 14 18:32:24 EDT 2005


Thanks Björnke

I had to read it twice before I got it, but I did. (get it the second 
time.)
The whole propertiySet including the customKeypart should be in one 
variable,
you can't assemble it in one statement. Put it all in a var before you 
use it and it's ok.

Thanks a lot

Warmest regards
Claudi










On Tuesday, June 14, 2005, at 02:30 PM, Björnke von Gierke wrote:

> Hi Claudi
> You need to assemble your String that you want to "put" before you do 
> anything else with it, like this:
>
> on mouseUp
>   put "uTestSet" into tVar
>   put  tVar & "[uValue]" into cprop
>   --alternatively if uValue is a variable:
>   --put tvar & "[" & uValue & "]" into cprop
>   put the cprop of this stack into fld "debug"
>   put cr & "-----" & cr after fld "debug"
>   put "put the" && tVar & "[uValue] of this stack after fld" && quote 
> & "debug" & quote into tCommandStr
>   do tCommandStr
> end mouseUp
>
> On Jun 14 2005, at 12:03, Claudi Cornaz wrote:
>
>> Hi Björnke,
>>
>>
>> I can't get your sugestion to work. That's why I do it with a do 
>> command.
>> I tried the following script. (uTestSet[uValue] is "Yes")
>>
>> on mouseUp
>>   put "uTestSet" into tVar
>>   put the tVar[uValue] of this stack into fld "debug"
>>   put cr & "-----" & cr after fld "debug"
>>   put "put the" && tVar & "[uValue] of this stack after fld" && quote 
>> & "debug" & quote into tCommandStr
>>   do tCommandStr
>> end mouseUp
>>
>> The result is:
>>
>> -----
>> Yes
>>
>> As you can see the first line is empty and when done with the do 
>> construct it works. (the line after ------)
>>
>> What am I doing wrong?
>>
>> Best wishes
>> Claudi
>>
>>
>>
>> On Tuesday, June 14, 2005, at 12:52 AM, Björnke von Gierke wrote:
>>
>>>
>>> On Jun 14 2005, at 00:03, Claudi Cornaz wrote:
>>>
>>>> .. (with "uText" possibly also in a var?) ..
>>>
>>> oh, didn't see this part of your mail, you wanted something like 
>>> this, right?
>>>
>>> on mouseUp
>>>   put "new" into tSetname
>>>   put "uText" into tProp
>>>   put  tSetname & "[" & tProp & "]" into cprop
>>>   put the cprop of this stack
>>> end mouseUp
>>>
>>> -- 
>>>
>>> http://contest.wecode.org
>>> Now running: the first ChatRev coding contest!
>>> sponsors:
>>> Altuit
>>> Andre Garzia
>>> Karl Becker
>>> Runtime Revolution
>>> TidBITS in cooperation with eHUG
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list