Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haxe Statics don't work #11

Open
postite opened this issue Jan 24, 2013 · 1 comment
Open

haxe Statics don't work #11

postite opened this issue Jan 24, 2013 · 1 comment

Comments

@postite
Copy link

postite commented Jan 24, 2013

Hi guys ! i recently noticed that haxe Statics like Math or Std doesnt work (at least for macros).
i ran the test to verify and it doesnt pass !!
(..) /test/erazor/TestMacro.hx:123: character 10 : { x : Float } has no field Math

even putting the typedef as Dynamic i get the same error.
Is it a non-feature, a known bug ? are there some solutions using Helpers or what ?
thx

@fponticelli
Copy link
Collaborator

This is not a bug but a feature. The point is that for runtime templates you need to explicitly pass whatever you want to expose. So if you want to pass the Math functions you should reference Math in your data object. The idea is to secure templates from improper usage of certain methods. Another option would be to extend erazor to include certain helper types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants