Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error:1924 FORMS is not an object.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090869
Message ID:
00090888
Views:
36
>The for loop initial value is only evaluated first time into the loop, and you have to decrement through it because the forms array collapses itself down as forms go away. The loop counter was 2 in the post mortem dump that got delivered in my morning email.
>
>Sometimes I'll get stupid errors like Columns is not an object in a builder that's working on a currently instantiated grid, cancel and run it again and it works just fine. Ah VFP you gotta love it. *g*
>
I'm aware of the .FormCount collapsing on itself. That's why I don't like it in the FOR...ENDFOR structure. IMHO, the values in that type of iteration structure should never be subject to internal or external modification. I'd just do something like this:
i = _SCREEN.FormCount
DO WHILE i # 0
  IF (_SCREEN.Forms[i].QueryUnload())
    _SCREEN.Forms[i].Release()
    i = i - 1
  ELSE
    _SCREEN.Forms[i].Activate()
  ENDIF
ENDDO
That way at least you know nothing funny is going on there.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform