openfl / actuate

Actuate is a flexible, fast "tween" library for animations in Haxe
MIT License
158 stars 66 forks source link

SimpleActuator: fixed issue where properties could not be tweened in Neko #105

Closed joshtynjala closed 4 years ago

joshtynjala commented 5 years ago

Since Actuate is using Reflect.setField(), it does not work in Neko for properties of a class that have setters. This change makes Actuate use Reflect.setProperty() instead. This API works with both properties and fields, so it shouldn't break anything.

I guess that an alternative approach would be to change the call to Reflect.hasField() in initialize() that is currently used to detect if something is a field. The documentation for Reflect.hasField() indicates that it may not work for classes, so Actuate probably shouldn't be using it there:

This is only guaranteed to work for anonymous structures.

joshtynjala commented 5 years ago

I've determined that this issue affects HashLink too.

joshtynjala commented 4 years ago

Thanks!