At 09:42 2014-08-13, Jeff Johnson <[email protected]> wrote:
I want to assign a value to a control and then refresh it:

    thisform.txtimf.value = myobj.imf
    thisform.txtimf.refresh()

Where txtimf is a textbox and myobj.imf is a property of an object

I want to generalize this process with variables:

    thisform.txt ? .value = myobj. ?
    thisform.txt ? .refresh()

and I can't seem to get it right.

Any ideas?

For this sort of playing around with text to create source, I tend to use & which is usually apostasy or something around here. It is amusing that I am posting about another approach after all of the & suggestions.

     You could use evaluate():

          what="imf"
          theobj=evaluate("thisform.txt"+what)
          theobj.value=evaluate("myobj."+what)
          theobj.refresh()

     If you want the proper way, I suppose you could use proper().  <BEG>

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to