Hard code or portable code
hershrev
hershbp at realtorsgroup.us
Wed Mar 3 23:24:44 EST 2004
Yes , All hats up for you.
Just a question, why when I write ...
put function () into field x it doesn't replace the old contents of the
field ?
Also to understand how does it work, when is this function activated ?
>>
On Wednesday, March 3, 2004, at 08:44 PM, Brian Yennie wrote:
> Hershrev,
>
> I'm not sure I understand what you mean by "hard-code".
> If you want a persistent way to reference a field, regardless of it's
> name, you can use the ID.
> Or, to get all of the fields, something like:
>
> repeat with i=1 to (the number of flds)
> put fld i after myVar
> end repeat
>
> If you want to write a function that always returns you the latest:
>
> function latestFields
> local myVar
> repeat with i=1 to (the number of flds)
> put fld i after myVar
> end repeat
> return myVar
> end latestFields
Now to compare if I write
on mouseUp
repeat with x=1 to the number of flds
put text of field x & return after y
end repeat
put y into fld 1
end mouseUp
what is the difference besides function or message, speed wise or
something else ?
thanks , hershrev
>
> HTH,
> Brian
>
>> 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")
>> if you come up with a recipe for this I'll raise my hat for you.
>
> _______________________________________________
> 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