- OS X Mountain Lion (10.8.1)
- XCode 4.5.1 with "Command Line Tools" installed in Preferences > Downloads > Components
- MacPorts Mountain Lion installer.
Install dependencies: (you might want a grab a coffee)
sudo port install boehmgc pcre mysql5 ocaml
class Test | |
{ | |
static function main() | |
{ | |
draw(0xFF); | |
draw(function(x,y){ return 0xFF0000; }); | |
// draw(function(x,y){ return "foo"; }); // compile error, not color | |
} | |
static function draw(color:Color) |
From 045276ae065567ca2610ef4976c823c54473fa89 Mon Sep 17 00:00:00 2001 | |
From: David Peek <[email protected]> | |
Date: Tue, 11 Jun 2013 11:13:18 +1000 | |
Subject: [PATCH] Patch required by homebrew formula - no static, paths | |
--- | |
Makefile | 7 ++++--- | |
src/tools/install.neko | 2 +- | |
2 files changed, 5 insertions(+), 4 deletions(-) |
class Main | |
{ | |
public static function main() | |
{ | |
trace(haxe.Json.stringify({a:1,b:2,c:3}, function(k,v){ | |
return k == "" ? v : v + 10; | |
})); | |
} | |
} |
class Test | |
{ | |
public static function main() | |
{ | |
var test = new Test(); | |
trace(test.style); | |
} | |
public function new() | |
{ |
package js; | |
import js.TypedArray; | |
import js.Canvas; | |
import js.type.DOMType; | |
import js.type.GLType; | |
import js.type.Core; | |
import js.type.Event; | |
import js.type.Object; |
#if macro | |
using haxe.macro.Tools; | |
using haxe.macro.Expr; | |
#end | |
enum Foo | |
{ | |
bar; | |
} |
// Test.hx | |
@:build(Builder.build()) class Test | |
{ | |
/** | |
Docs! | |
*/ | |
public static function main() {} | |
} |
Install dependencies: (you might want a grab a coffee)
sudo port install boehmgc pcre mysql5 ocaml
class FloatHelper | |
{ | |
/** | |
Formats a large float (eg Date.getTime) as a string with no exponent in cpp. | |
1.347420344e+12 -> 1347420344000 | |
*/ | |
function formatFloat(float:Float):String | |
{ | |
#if cpp | |
var str = Std.string(float); |
// haxe -x SetterTest | |
#if macro | |
import haxe.macro.Expr; | |
#end | |
class SetterTest | |
{ | |
public static function main() | |
{ |