Ive created a search engine in flex no to elaborate and it
works to a certain extent. the timeline is i input a word and hit
the search button it sends the word to a php script that looks in
the database for entries in a table that match then returns the
values of the rows to the php file and spits out an xml file. The
xml is then parsed by the search engine and the nodes are put into
an array collection whos data is then used by my itemRenderer to
populate a list component.
Now the problem i have is that if i input a search word that
i know has more than one entry in the database all the code works
the search works and it populates the list properly. However if i
input a word that has only 1 or no entry it get the error #1009 and
i cant figure out why. i kind of understand if the arrayCollection
has nothing in it since its a null object but when i know theres an
entry it makes no sense why its spitting that error out.. heres my
mxml code for the search engine..Thank you in advance to any who
can help me..
By default Flex serializes xml into an object. When you have
only one result Flex assumes that the particular node is just a
property instead of a collection. If you change the result format
to "e4x" you should have better consistency in your results.
Would you be able to elaborate on how to go about it..ive
tried putting it into and xmllistcollection and a couple of other
ways but i still get either the same result or i get another error
because of a failed coercion i believe..thanks for the help so far
any other help would be appreciated..