Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Redirect the method gotfocus of ALL objects in a contain
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01414786
Message ID:
01414804
Views:
41
>Hi naomi,
>
>>
>>1. Add FOXOBJECT keyword to your loop - may not 100% prevent C0005 errors
>>
>
>euh .... i don't understand ?
>
>
>

FOR EACH loObject in this.Objects FOXOBJECT



>>2. What exactly do you mean here - missing some inner containers? If yes, then you need to recursively call BindEvent for containers (or objects) inside containers.
>
>
>please see attachment.
>
>This code see only refbizobj ( container ) , ccontainer1 ( Container ) and odeloder ( container ) but NOT
>the rest of objects ...?
>
>
>BHT

In order to drill down to objects inside the objects you need to call your method recursively, e.g.

thisform.ReassignGotFocus(toObject)
for each loObject in toObject.Objects FOXOBJECT

    if pemstatus(loObject, 'OBJECTS',5)
         thisform.ReassignGotFocus(loObject)
    else
       your original code here
       bindevent(... ) && 
   endif
next
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform