Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: dynamically...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 790 of 861
Post > Topic >>

Re: dynamically creating pages and accesing them in VFP

by Gene Wirchenko <genew@[EMAIL PROTECTED] > Aug 2, 2007 at 05:58 PM

shah <shahjagat@[EMAIL PROTECTED]
> wrote:

[snip]

>And when I try to set any propery as follows -
>
>thisform.pageframe1.&lpagename.anyproperty - && it does not work.
                               ^
     This period terminates the &.  You need a second one to separate
the names.  Assuming that you are trying to access a propery of page1,
          thisform.pageframe1.&lpagename.anyproperty
resolves to
          thisform.pageframe1.Page1anyproperty
whereas
          thisform.pageframe1.&lpagename..anyproperty
resolves to
          thisform.pageframe1.Page1.anyproperty

>For any property I want to access, I am doing the following
>
> For i =1 to 5
>  lpage="Page"+alltrim(str(i))+".visible=.t."
> next
>
> And then
>
>thisform.pageframe1.&lpage  && this works.

     It is not obvious that this is an assignment.  Do not do it.
Think of the poor maintenance programmer, who might even be you.

>I am sure there is a more elegant way to do this....

     Just add another period.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
     I have preferences.
     You have biases.
     He/She has prejudices.
 




 4 Posts in Topic:
dynamically creating pages and accesing them in VFP
shah <shahjagat@[EMAIL  2007-08-02 17:00:05 
Re: dynamically creating pages and accesing them in VFP
Gene Wirchenko <genew@  2007-08-02 17:58:20 
Re: dynamically creating pages and accesing them in VFP
shah <shahjagat@[EMAIL  2007-08-02 19:27:30 
Re: dynamically creating pages and accesing them in VFP
Gene Wirchenko <genew@  2007-08-02 19:55:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:28:09 CST 2008.