My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

open Monobjc
open Monobjc.Cocoa

let main() =
printfn "Hello from F#"

ObjectiveCRuntime.LoadFramework("Cocoa");
ObjectiveCRuntime.Initialize();
use pool = new NSAutoreleasePool();

printfn "Username: %A" (FoundationFramework.NSFullUserName())
printfn "Home Dir: %A"(FoundationFramework.NSHomeDirectory())
use dict = new NSDictionary(new NSString "/System/Library/Frameworks/AppKit.framework/Resources/version.plist")
printfn "AppKit Version: %A" (dict.[new NSString("CFBundleVersion")].CastTo<NSString>())
()

main()

Change log

r23 by cameron.taggart on Dec 22, 2009   Diff
moving blog code in 2009 to be under
tags/blog-2009
Go to: 
Project members, sign in to write a code review

Older revisions

r5 by cameron.taggart on Dec 14, 2009   Diff
new blog entry code for
GtkWindowExample in F#
reorganized blog code to be under
blog/date
minor fixes to HelloFoundation code
r2 by cameron.taggart on Dec 10, 2009   Diff
port of Monobjc console application
tutorial to F#
for a new blog post at
http://blog.ctaggart.com/
All revisions of this file

File info

Size: 556 bytes, 18 lines
Powered by Google Project Hosting