Hi,

can you give us the full code to look upon?

By on 10/11/2010 9:29 PM ()

thanks reply me

i just type follow code in interactive

1
> System.Linq.Observable;;

and the result is :

1
2
3
4
5
6
7
> System.Linq.Observable;;

  System.Linq.Observable;;

  ------------^^^^^^^^^^

C:\Users\Administrator\AppData\Local\Temp\1\stdin(4,13): error FS0039: The value, constructor, namespace or type 'Observable' is not defined

what confuse with me is that why i added references System.CoreEx.dll and System.Reactive.dll and it also still can't work

By on 10/11/2010 9:46 PM ()

You are using F# interactive right?

If so you have to add a reference with the #r - command (see [link:stackoverflow.com])

So just begin with

1
2
3
4
5
6
7
#r "System.Reactive";;

--> Referenced 'C:\Program Files (x86)\Microsoft Cloud Programmability\Reactive Extensions\v1.0.2617.0\Net4\System.Reactive.dll'

The next problem is, that "System.Linq.Observable" is no valid expression. I don't know what you are trying to achive but for example:<code lang=fsharp>
            let x = System.Linq.Observable.Range(5,10)
            x.Subscribe(printf "%d; ")

works just fine for me:

1
5; 6; 7; 8; 9; 10; 11; 12; 13; 14; val it : System.IDisposable =System.Collections.Generic.AnonymousObservable`1+Disposable[System.Int32]
By on 10/12/2010 2:24 AM ()

thanks!! CKoenig

finally!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#r "System.Reactive.dll" //thanks agains!   i run this code as script(alt + enter ) ,so this line need

let form = new Form(Visible=true, TopMost=true, Text="Event Sample")

let mouseDownMove=
    System.Linq.Observable.SkipUntil(form.MouseMove,form.MouseDown)

let mouseDownMoveUp=System.Linq.Observable.TakeUntil(mouseDownMove,form.MouseUp)

mouseDownMoveUp.Subscribe(fun (args:MouseEventArgs)->

    printfn "%d %d" args.X args.Y

)
By on 10/12/2010 4:49 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