Since you aren't overriding any class methods, you don't need the "with" after the "new, so you can just use this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 

#light

open System
open System.Windows
open System.Windows.Controls

type IValueGetter =
    abstract Value : obj with get, set
let test = { new WrapPanel() 
             interface IValueGetter with
                member x.Value
                  with get() = "" :> obj
                  and set x = ()  }

This is correctly spec'd in our internal working spec (which we'll be making available in due course)

Thanks

don

By on 3/5/2008 12:51 PM ()

Will this work in the next version?

By on 2/14/2009 12:25 PM ()

I also didn't knowed about that...
thx..

By on 3/5/2008 11:23 PM ()

I wasn't aware of this. What a powerful feature! The mind reels...

By on 3/5/2008 3:09 PM ()
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