Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
V6s5 - FOR EACH OBJECT infinite recursion for PageFrames
Message
From
27/01/2004 13:41:11
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00870966
Message ID:
00871057
Views:
15
>Hi all
>
>I am currently trying to adapt Locale.vcx by Greg. His original code (as will be found in the downloads section) does not work on pageframes (atleast for me <g>) so I added a similar code in the FOR EACH loop, on doing so the recorsion goes into infinite loop. What have I done wrong, please advise.
>
>
>method setlocale()
>
FOR EACH oObj IN tcObj.OBJECTS
>...
>...
>
>*** this is original Greg's code
>	IF PEMSTATUS(oObj,"Objects",5)
>		IF oObj.OBJECTS.COUNT>0
>			this.setLocale( oObj )
>		ENDIF
>	ENDIF
>	>*** this is my copy of the original
>	IF PEMSTATUS(oObj,"Pages",5)
>		IF oObj.Pages.COUNT>0
>			this.setLocale( oObj )
>		ENDIF
>	ENDIF
>NEXT
As Christian said, it would have to be really recursive - tcObj would have to be passed as parameter, i.e. you're missing LParameters tcObj on the top.

Look at download #21923 - you could just create the recursor object, pass your object and the procedure to run on it and its members, and run its recurse() method. It will handle recursion for you.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform