Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Children
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00621025
Message ID:
00622223
Views:
19
David,

>>This looks elegantly simple. I can't wait to try it out.

I'm waiting back to hear from Paul and Dan (and possibly other lurkers...you know who you are < s >) for feedback, but you can go ahead and add the method to your copy of KBizObj now...when you get the next version of the Framework, it will be there for you. If I make any changes between now and then, I'll let you know.

I've reposted the code here and reformatted it...I just noticed I forgot to do that in my previous message!
LPARAMETERS tcMessage, tuParm

LOCAL lnObjCount, lnCount, loChildBizObj, llRetVal, lcMessageCall

IF TYPE("This.RefBizObj") == "O"

   *--- Get the number of child objects ---*
   lnObjCount = This.RefBizObj.GetObjectCount()

   *--- Build the message call ---*
   IF PCOUNT() = 1
      lcMessageCall = "loChildBizObj."+tcMessage+"()"
   ELSE
      lcMessageCall = "loChildBizObj."+tcMessage+"(tuParm)"
   ENDIF

   *--- Iterate through the child objects and send each one the message ---*
   FOR lnCount = 1 TO lnObjCount
      loChildBizObj = This.RefBizObj.Get(lnCount)
      IF PEMSTATUS(loChildBizObj, tcMessage, 5)
         llRetVal = &lcMessageCall
         IF NOT llRetVal
            EXIT
         ENDIF
      ENDIF
   ENDFOR
ENDIF

RETURN llRetVal
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform