asyncRule_Complete returned value not set

asyncRule_Complete returned value not set

Old forum URL: forums.lhotka.net/forums/t/7868.aspx


dbaechtel posted on Sunday, October 25, 2009

In cslavb-3.6.3-090929.zip ValidationRules.vb, asyncRule_Complete is defined as:

Private Function asyncRule_Complete(ByVal target As Object, ByVal e As AsyncRuleResult) As Boolean

But in the method, the boolean result value is never set.

What should the returned boolean value be?

 

RockfordLhotka replied on Sunday, October 25, 2009

Sean may be able to provide more insight, but if I remember right the problem here is that VB lambda expressions can't be void (Sub) - they must be a Function. But in reality this one should be a Sub - so it was made into a Function due to a limitation of VB, but the return value is not used.

A lot of that async code will become MUCH simpler with VB10 when VB gets the missing lambda features that are really necessary to do this sort of work.

Copyright (c) Marimer LLC