avoiding #if #elseif using compiler -remap command

1 view
Skip to first unread message

kiroukou

unread,
Oct 6, 2009, 4:24:48 PM10/6/09
to haXigniter
Do you think it might be possible, like neash remaps graphicals
classes from flash to neash.

++

Andreas Söderlund

unread,
Oct 6, 2009, 5:05:10 PM10/6/09
to haxig...@googlegroups.com
On Tue, Oct 6, 2009 at 10:24 PM, kiroukou <kiro...@gmail.com> wrote:

Do you think it might be possible, like neash remaps graphicals
classes from flash to neash.

I'm not sure if I understand exactly, but if you want to add extra arguments to the build process, use the file "src/haxigniter.hxml". Is that what you needed?

/Andreas

kiroukou

unread,
Oct 7, 2009, 12:03:21 PM10/7/09
to haXigniter
Hi,

no not really.

I mean that there's quite a lot of #if #elseif for php and neko
imports.

compiler --remap neko:php command allows to transform the neko.system
import to php.system directly.
Neash uses it for redirecting flash import to neash one.

No big deal here, it would just allow you to avoid a bunch of #if
#elseif precommand

Thomas

On 6 oct, 23:05, Andreas Söderlund <ciscoh...@gmail.com> wrote:

Franco Ponticelli

unread,
Oct 15, 2009, 8:45:15 AM10/15/09
to haXigniter
I am not a fan of --remap because in my opinion it is not easy to
understand for people reading the code. Another alternative could be
to make a "neutral" package to map aliases. Somthing like:

// file: server/Lib.hx
#if neko
typedef Lib = neko.Lib;
#elseif php
typedef Lib = php.Lib;
#end

In the application you will use of course: server.Lib.doSomething()

Aliases are resolved at compile time and do not add indirections.

Franco
Reply all
Reply to author
Forward
0 new messages