Comments (14)
Try compiling with -dce no
from hscript.
how do I do that in an openfl project?
from hscript.
Not sure. You'll need to look up for the .nmml docs and see how to pass additional compiler options
from hscript.
Do you know where I could find that? sorry to sound clueless:/
from hscript.
Try using <haxeflag name="-dce" value="no" />
:
https://gist.github.com/jgranick/1763850#file-gistfile1-xml-L332
from hscript.
hmm ok that works (could you explain what it does?) for int iterators 0...1
and array iterators, but interestingly enough, FlxTypedGroup has a custom iterator, so while for (i in group.members)
works, for (i in group)
still gives me EInvalidIterator((active: true | visible: true | alive: true | exists: true))
from hscript.
It may be that its iterator() function has an optional argument ( http://api.haxeflixel.com/flixel/group/FlxTypedGroup.html ). The hscript interpreter is trying to call the function with no arguments, while it needs one argument - it being optional is a compile-time feature.
from hscript.
ok, I'll just note it in iceentitys documentation to directly use the members array, thanks:D
from hscript.
You should report to HaxeFlixel that adding optional arguments breaks Dynamic iterators.
from hscript.
I mentioned it to @Gama11 on twitter, maybe they can split it into iterator() and filteredIterator(), btw why does keeping dead code fix for-loops?
from hscript.
Hm... I take it this is a limitation of how hscript works (compile time vs runtime?) and there's nothing you can do about it on your side?
from hscript.
I'm thinking we should find a way to make hscript always keep IntIterator and its fields. It's a bit silly if this requires DCE disabling.
from hscript.
You should add --macro keep('IntIterator') to extraParams.hxml.
from hscript.
That's actually a very good idea!
from hscript.
Related Issues (20)
- semicolon in string HOT 5
- hscript.Macro and hscriptPos HOT 1
- Authorize char 36 "$" HOT 2
- Haxe 4.2.2 - Std.is is deprecated. Use Std.isOfType instead HOT 7
- Invalid access to field HOT 1
- Operators are allowed in var declaration
- Preferred file extension? HOT 1
- Strange behaviour HOT 6
- Transform direct function's call in expr into block with tmp var does'nt work HOT 1
- Throwing SReturn HOT 2
- Null function reference for IntIterator HOT 5
- Result depends on code outside script HOT 5
- Anonymous functions fail on Macro context
- [PHP] array access modifies array if access out of bounds
- Type's path HOT 7
- Order of Operations Bug/Regression HOT 1
- Recent features documentation HOT 2
- Math.cos example fails when targeting HashLink HOT 2
- convert Expr -> Expr in the opposite direction HOT 3
- Async interpreter work example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hscript.