[Gambas-user] casting, macro change from str to resultfield?

johnf jfabiani at ...1109...
Tue Jan 3 08:01:39 CET 2006


Hi,
 FOR EACH hfield IN contactdata.Fields
        INC i
        loopfield = "contactdata!" & hfield.Name
        contacts[c, i].Text = loopfield
      NEXT

contactdata = result
contacts = gridview

So I'm attempting to fill in the cells of the gridview with resultfields.  But 
I don't understand how to convert the str ("contactdata!fieldname") to not a 
str but a resultfield as in contactdata!fieldname (which is not a str).  In 
the Foxpro world I would use "&loopfield." and it would be evaluated as
contactdata!fieldname (not a string).  Surely there is a way to do this in 
Gambas?

Maybe there is a better way?  BTW I choose the gridview to allow editing - is 
this right?
John




More information about the User mailing list