Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major Bug - BINDEVENTS
Message
From
23/12/2004 09:24:31
 
 
To
23/12/2004 00:27:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00971680
Message ID:
00971766
Views:
27
>There is a MAJOR bug with the just released VFP9 with respect to BINDEVENTS.
>
>The return value is always that of the event source and never that of the delegate no matter what the flag setting.

Hi Jeff,

I can understand your disappointment, but this fixing is one blessing.

The operation of BINDEVENT() in VFP8 was mistaken,
because with flag set to 1 or 3, the event handler
it interferes directly with the operation of the program.

Fortunately the VFPT has understood the problem and has placed remedy.

You can use this side effect on VFP8, but it destroyed the concept of encapsulation of a method.

Terrible the description in the documentation of VFP8 Note1 of BINDEVENT():
...Therefore, it is recommended that the delegate method contain the same return value as that of the event itself. In Visual FoxPro, a procedure that has no explicit RETURN statement returns an implicit value of True (.T.).
But, how can i known the value return in the event? A arcane issue!

Another big issue of VFP8 behaviour:
if you use BINDEVENT/UNBIND dynamically, the order of bindevent it is not deterministic,
then it is practically impossible to control the value returned to the calling procedure because
the last delegate method executed it is random.

I hope that the VFPT (in this case) not returns behind and that documents this.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform