Closed gamedevsam closed 10 years ago
ah smart, that's a lot cleaner, I was trying to come up with a nicer way, this is it:) one question, in haxe, can't you just specify the variable with a getter? is there a need to have the separate private one?
ok I also changed the default branch:)
I think you should be able to use [@:isVar](http://old.haxe.org/manual/haxe3/migration#property-field-creation metadata) to avoid creating a private var. I'm not sure this code will work (I haven't tested it), but if it doesn't, you can always add back the private variable.
what does @:isVar do? Why cant it be purely pubic if it has a null setter?
ahh, I don't think its nessesary due to the null setter: http://old.haxe.org/manual/haxe3/migration#property-field-creation
I guess haxe understands its a field because it cant be changed without being one
You might be right... I removed it.
Ok awesome, really helpful pull by the way!!:) thanks!!
I think this framework will become a big deal for HaxeFlixel users. hscript support is very nice, especially now that openfl supports live asset reloading. Keep improving it!
Thanks:) I really appreciate it, interestingly enough, while the live asset reloading prompted me to put in the feature, the actual live version is just using haxe IO
the manual version still uses openfls system though
uh oh, getting a stack overflow, gonna need to do some testing
is it possible properties cant be set from static methods?
No, you need to put back that private var... Apparently setting a property in its getter confuses haxe.
ok yup, you were right in the first place:), thanks! I'll update the docs tomorrow, really appreciate it!:)
It's less verbose, same performance, and fully backwards compatible.