Cannot define sys by myself for nodejs target

64 views
Skip to first unread message

vroad

unread,
Jan 18, 2015, 11:29:05 PM1/18/15
to haxe...@googlegroups.com
For nodejs target, Currently I'm using modified version of Haxe to define sys macro.
It would be also possible to use sys class with original version of Haxe by replacing all "#if sys" with "#if (sys || nodejs)", but I don't think this is a good practice...
nodejs is one of system platforms, right?
Could you consider adding a new macro that allows you to define sys macro? something like "--macro allowSys()".

Ivan Tivonenko

unread,
Jan 19, 2015, 11:50:16 AM1/19/15
to haxe...@googlegroups.com
for nodejs there is hack - just do
--remap sys:sys


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Andy Li

unread,
Jan 19, 2015, 1:13:13 PM1/19/15
to haxe...@googlegroups.com
"--remap sys:sys" is the old way of doing that.
Nowadays the recommended way is to use "--macro allowPackage('sys')".

Best,
Andy

vroad

unread,
Jan 23, 2015, 2:42:26 AM1/23/15
to haxe...@googlegroups.com
None of them allowed me to define sys with "-D sys".
They just allow me to access sys, not defining.
If there isn't a way I keep using modified Haxe...

vroad

unread,
Jan 23, 2015, 2:44:53 AM1/23/15
to haxe...@googlegroups.com
I didn't see macros in that page...
--macro define("sys")
worked for me, Thanks.
Reply all
Reply to author
Forward
0 new messages