This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Drawing | |
open MonoTouch.UIKit | |
open MonoTouch.Foundation | |
open ReachingNirvana.Core | |
open Cirrious.MvvmCross.Binding | |
open Cirrious.MvvmCross.Binding.BindingContext | |
open Cirrious.MvvmCross.Touch.Views | |
[<Register ("FirstView")>] | |
type FirstView () = | |
inherit MvxViewController () | |
let label = new UILabel() | |
let textBox = new UITextField() | |
override this.ViewDidLoad () = | |
base.ViewDidLoad () | |
label.Frame <- new RectangleF((float32)0,(float32)0,(float32)320,(float32)50) | |
this.Add(label) | |
textBox.Frame <- new RectangleF((float32)0,(float32)70,(float32)320,(float32)50) | |
this.Add(textBox) | |
let set = MvxBindingContextOwnerExtensions.CreateBindingSet<FirstView,FirstViewModel>(this) | |
set.Bind(label).To("Hello") |> ignore | |
set.Bind(textBox).To("Hello") |> ignore | |
set.Apply() |
It's awesome ... and I reckon it might be what the future looks like :)
If you want to learn more:
- read about it here: http://jmgomez.me/reaching-the-nirvana-mvvmcross-xamarin.ios-fsharp
- try F# in your browser here: http://tryfs.net/
Juan M Gomez - @_jmgomez_ - thanks hugely for pulling us closer towards the f#uture - I'm so looking forwards to using this. I can sense the hoverboards getting closer! Badge of awesomeness #2
I would really be glad to see new technologies and practices development era, but F# looks similar to Visual Basic.NET for me. :)
ReplyDelete... Meaning, that Microsoft "dragging" it for so long, spending so much time for compilers etc, but whithout giving any definite understanding why are those for at all as there are no so many advantages in their practical use! Possibly, really only some time in far future. )