Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where does VB really beats VFP? Interface? Data access??
Message
From
25/01/2000 13:15:14
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322013
Message ID:
00322310
Views:
23
An event is a message that is broadcasted to all objects that respond to this event. For example, when a user press on a command button, a Click event is broadcasted and the command button that is linked to this event will execute it's Click method.

In VB (and others language, except VFP) you can create your own event and raise it from within your application. Let's say that you need to keep the user informed on the progress of a process that lies in the business layer in a n-tiers environment. In VFP, since it can't raise events, you will need to pass the name of the method to call from the interface layer to the business layer so that the progress bar can be updated in the loop. This will increase the coupling between the classes and is not desirable. In VB, you could create a Iteration event that will be raised at the end of a loop. You could then create a method to execute when a Iteraction event is fired in the interface layer to update the progress bar. This is a much cleaner approach than the previous one.

Note that even if VFP can't raise events, it can respond to an event with the new VFPCOM available on MS site.

HTH
>Hello, what do you mean by create and raise events?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform