You are right. As it stands now the only difference between attr.*Dyn and attr.*DynPred is that the latter removes the attribute when the predicate is false and the former only updates the value so conceptually they aren't quite the same but the effect in this case is. You might want to take a look at Attr.DynamicClass which, I suppose, does what you tought attr.classDynPred would. Its type is a different as it expects a View<'T> and a mapping 'T -> bool instead of a View<bool> which is a bit questionable in terms of the other parts of the API.

Maybe we should make attr.classDynPred work this way but that might be confusing as it would do a different thing than all the other ones.

By on 9/3/2015 2:52 AM ()

Attr.DynamicClass does exactly what I want. Thank you.

By on 9/3/2015 3:30 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper