Hard code or portable code

hershrev hershbp at realtorsgroup.us
Wed Mar 3 20:55:58 EST 2004


On Wednesday, March 3, 2004, at 08:52 PM, Dar Scott wrote:

>
> On Wednesday, March 3, 2004, at 06:06 PM, hershrev wrote:
>
>>> Create a list in a manner much like this:
>>>
>>> repeat with x = 1 to the number of fields
>>>    put (the name of field x) & LF after myVar
>>> end repeat
>> Now , how do you get  the contents of all the fields ?
>> if you put myVar into myQuery,  the result will be the field names 
>> and not the field content ? ( THE MAIN POINT IS TO GET THE LATEST 
>> DATA meaning if the user edits the field after the repeat script the 
>> result should be the updated contents "as hard code")
>
> I am probably still a little lost.  I guess I don't know what "hard 
> code" is.
Hard code is writing in the editor
on mouseUp
   put field 1 & field 2 into mSql
end mouseUp
>
> Once the above is set, you can get the contents with this:
>
> put LF into bindingChar
> put empty into valueAccumulator
> repeat for each line f in myVar
>   put field f after valueAccumulator
> end repeat
>
> Do you want to have all the field values evaluated each time you look 
> at the variable?  I don't know how to do that.
>
> Here are three things that might be close.
>
> A.
> Use a function instead of a variable.
>
>    put catFields() into ...
>
> B.
> Use value on the variable.  Set it up like this:
>
>    field "Alpha" && field "Beta' && field "Gamma"
>
> Use it like this
>
>    put value(autoCatFields) into ...
>
> C.
> Use properties.  If all those field are in a group, then define a 
> custom property with a getProp that calculates the concatenation of 
> the values of all fields within the group.
>
>    put the catFields of group "Will Robinson" into ...
>
> Am I getting closer?
>
> Dar Scott
>
>
> _______________________________________________
> 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