Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Suggestion For Best Practices with BO's
Message
De
10/09/2004 09:47:09
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00938040
Message ID:
00941027
Vues:
15
Simon,

Now you've run into a limitation of VFP, which is that it cannot raise COM events. There are workarounds. Nick Neklioudov wrote an article a while back that uses a VB component to raise the event: http://foxpro.advisor.com/doc/07536

Also, Calvin Hsia wrote an article that implements a callback design that might work. Quote: "Visual FoxPro 7.0 makes it possible for the developer to create COM objects, which publish interfaces that clients can implement. This callback scenario is almost identical to Visual FoxPro objects raising events to clients." Here's the link: http://msdn.microsoft.com/library/en-us/dnfoxgen7/html/vfpandcom.asp

>Hi Joel
>
>Yes I am using VFP8. I am just wondering how this might work if Excel was the frond End using my BO.
>
>Thanks
>Simon White
>
>
>>Hi Simon,
>>
>>This is a perfect scenario for using BindEvent() in VFP8. Create an UpdateStatus() method on your BO that accepts progress information as parameters, then call that method during the long process. Use BindEvent() to call the appropriate method on your progress indicator every time UpdateStatus() is called. The BindEvent() statement should be in the code that instantiates the BO and the progress indicator.
>>
>>Of course, this requires VFP8. Let me know if you are using an older version.
>>
>>>Hi
>>>
>>>If I have a long process running in a Business Object and want to let the user see the progress what are some suggestion of best practice for this scenario which ensure the separation of the interface and Business Object layer?
>>>
>>>I am assuming the technique should work even if I switch from a Windows front end to a web front end etc.
>>>
>>>Thanks
>>>Simon White
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform