EReg serialization

40 views
Skip to first unread message

Clark Jones

unread,
Jan 28, 2016, 9:04:04 PM1/28/16
to Haxe
I just happened to notice that trying to serialize an EReg instance will throw a runtime error when targeting Neko. Seems to work fine on Javascript though. Is there a better workaround than serializing an object with the EReg constructor args and then creating the EReg some time after deserialization?
Does anyone know of any other unsupported targets? 

Thanks

Ashiq A.

unread,
Jan 29, 2016, 11:22:12 PM1/29/16
to haxe...@googlegroups.com
Why do you need to serialize/deserialize an EReg?

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Clark Jones

unread,
Jan 30, 2016, 7:15:45 PM1/30/16
to Haxe
I was playing around with the haxe-dom library and including a router. Haxe-dom serializes data and the router with its ERegs was part of that data. I could keep it separated and reinitialize the router on the client, so the issue could be avoided, but because serialization of ERegs seems to be inconsistent between targets I thought I'd bring up the issue.  Also the EReg was part of an anonymous object, making it a member of a class instead and using hxSerialize/hxUnserialize methods also works for my use case. So I guess I've solved my own question but I'm still curious to hear other thoughts and suggestions. 

Cambiata

unread,
Jan 31, 2016, 1:58:42 AM1/31/16
to Haxe

I was playing around with the haxe-dom library and including a router.
 
Sounds cool!
Reply all
Reply to author
Forward
0 new messages