3.0 Field numbering messed up

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Oct 7 20:29:58 EDT 2008


Hi Joe,

Are you using "1", "2" etc. as field names? That's wrong. Revolution  
parses these names as numbers, regardless of the quotes. You must add  
some characters to make sure that Revolution parses the name as a  
string, e.g. "Val 1", "Val 2", etc.

You can refer to these fields in a repeat loop or other script like  
this:

repeat with x = 3 to 7
   add fld ("Val" && x) to myTotal
end repeat
-- do something with myTotal here

I think that saying "I shouldn't have to" is a little inappropriate in  
this particular case, even though it might apply to many other  
workarounds.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
  for more info.

On 8 okt 2008, at 02:16, Joe Lewis Wilkins wrote:

> Attention:
>
> I'm doing some math on a form. Carefully, I thought, I numbered the  
> various flds so that I could refer to them in sequence or, at least,  
> know what their names are by their positions without having to  
> constantly check them out. However, when it came time to refer to  
> them I was a bit mistaken. It seems that a field fld "1" does not  
> return the value that is in that field; it returns the value that is  
> in a totally different field, but the one that is "1" by layering.  
> It was the first field I created. It does the same with fld "2";  
> refers to the second field I created and one that is "2" by  
> layering; not by name. To me this is a bug. Correct?
>
> I can diddle around and make this work, but I shouldn't have to.  
> When I refer to an object by its name I should get the contents of  
> that object.
>
> TIA,
>
> Joe Wilkins




More information about the use-livecode mailing list