Closed NuclearCookie closed 7 years ago
Uhm, maybe adding @:generic to it would work better ?
Sadly, adding @:generic
is not compatible with the current implementation of buildSerializable
.
When adding @:generic
I get the message: A generic class can't have static fields
.
This is caused by the static __clid
field that is generated throught the autobuild macro.
I see there is a @:genericBuild
which I believe I could use, but I don't know how to convert the buildSerializable
to return a haxe.macro.ComplexType
instead of a Array<haxe.macro.Field>
I've fixed this by using a different class
Hi again.
I'm getting closer to serializing our openfl with hxbit! I have another issue: We have a generic class
UnshrinkableArray
that we'd like to serialize. https://github.com/FishingCactus/openfl/blob/feature/hxbit_serialization/openfl/utils/UnshrinkableArray.hxSince it's generic, I don't know how I can serialize
@:s _items:Array<T>
! When I make theUnshrinkableArrayData<T> implement
hxbit.Serializable`, I get the following compile error:../openfl/utils/UnshrinkableArray.hx:169: characters 15-35 : Unsupported serializable type Array<openfl.utils.UnshrinkableArrayData.T>
Thanks for your help!