Hey Nicolas!
Followed your suggestion, stored all errors in an Array, then made a little function to sort by weight the CheckResults, with a weight of 1 for CInElement, a weight of 9 for CElementExpected and a weight of 5 for the others. Have to test it more, but so far works great. Now I can manage RChoice to return "element <not-in-choice> while expecting <choice1> or <choice2> or ....<last-choice>" instead of "element <not-in-choice> while expecting <last-choice>..." but I can live without that. The ROptional also is not so important, but this was very annoying.
If you think my code can help anyone I'll be glad to share it, but I think it can
be made in a far more elegant way.... (mmm, did I just haxed haxe?, man, how I love open source!) As I said, works for me!.
Thanks a lot for your help!
Carlos
__________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/ |