toggle Cinema 24 Jan 2008

ptsss The entity name must immediately follow the ‘&’ in the entity reference Posted by Insane in Actionscript x.x, Flex | One response

Este problema es de flex y al parecer pasa muy seguido , la causa en si es que flex es pendejo , tu puedes tener tu codigo con algo como esto :

if( (transaction === _transactionStack.getTop() && transaction.getStatus()!=Transaction.DONE ) )

 


muy normal, muy x, simple, sin embargo te topas con el error The entity name must immediately follow the ‘&’ in the entity reference , puede presentarse en tu <script>o en un binding dentro de alguna etiqueta.

<mx:Combobox enabled=”{(transaction === _transactionStack.getToStack() && transaction.getStatus()!=Transaction.DONE )}” >

Segun Adobe esto no es un bug , pues debes sustituir los operadores logicos por & debido a las reglas Xml.Bueno pues hay varias soluciones:

  • Puedes sustituir && por | , parece ser que no tiene problemas con los pipes .. siguiendo la ley de Morgan : (A && B) == ! (!A || !B)

if( (!( transaction === _transactionStack.getTop())) || (!(transaction.getStatus()!=Transaction.DONE)) )
  • Si tu problema se presenta en una linea de codigo dentro del tag <mx:Script> asegurate de haber puesto entre <![CDATA[ y ]]>.
  • Puedes reemplazar tus ampersands por & en tus evaluaciones. asi
    <mx:Combobox enabled=”{(transaction === _transactionStack.getToStack() &amp;&amp; transaction.getStatus()!=Transaction.DONE )}” >

    puffff esta ultima es de lo mas feo q he visto.

  • Share/Bookmark

Promote this post

Would you like to add this post to your bookmarks? Come on, do not miss any updates and stay tuned.
Please share with us!
+

1 Comments to “ ptsss The entity name must immediately follow the ‘&’ in the entity reference ”

  1. Hey, I found your blog in a new directory of blogs. I dont know how your blog came up, must have been a typo, anyway cool blog, I bookmarked you. :) :)

Leave a Reply ( Guest )

(*)

(will not be published) (*)