Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrame Limit
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00111323
Message ID:
00111358
Views:
20
Jerry,

If you object references instead of a fullblown name you might be able to get it to use all available memory:
loObject = thisform
for i = 1 to 1000
   with loObject
      .AddObject( "pageframe1", "pageframe" )
      .PageFrame1.PageCount = 2
   endwith
   loObject = loObject.PageFrame1.Page1
endfor
I think the enduser would be screaming bloody murder after 3 or 4 levels of nested pageframes, but who says the UI has to have the user in mind when it's designed. *LOL*

>It may, or it may just be limited by memory. I wrote this to check how deep it could go:
>
>PUBLIC myform, mypath
>myform=createobject("myform")
>myform.visible=.t.
>mypath="myform"
>
>FOR i = 1 to 10000
>_screen.caption=alltrim(str(i-1)) + " pageframes added"
>&mypath..addobject("pgf"+alltrim(str(i)),'pageframe')
>mypath=mypath+"."+"pgf"+alltrim(str(i))
>&mypath..pagecount=2
>&mypath..visible=.t.
>mypath=mypath+ "." + "page1"
>endfor
>
>DEFINE CLASS myform as form
>enddefine
>
>I got a "line to long" error at 635 nested pageframes, as the command line for it is beyond the maximum length of a line of code. This would seem to be more than sufficient for what anyone would do that could still be readable without a microscope.
>
>--
>Jerry
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform