Skip navigation
Currently Being Moderated

Am i using wrong traversing or dispatching ??

Feb 1, 2013 11:22 PM

Tags: #xml #event #dispatcher #traversing



I have   3  view.


first one is  Sparklist   with external xml data and i send it with  selectedItem   indexchange handler  to




in view2  display selectedItem detail   and i added Spark Button and send it  to view3  for


display same item subnode  details but at  thirt  view not work.


i got error at the debug  


Error: Unknown Property: 'name' 


and  at the list     DispatchEventHandler [No Source] , EventHandler [No Source].


here is my code and external Xml   file structure.


view2 - MoviesDetail

---------------------------------------------------------------------- ----------------------------

protected function Showtimes_clickHandler(event:MouseEvent):void


                navigator.pushView(views.MoviesShowtime, data);













---------------------------------------------------------------------- -----------------------

View3 - MoviesShowtime


i try to display  subnode of  xml  data  at    shotimes.location   is  name

i am trying this traversing as at documents but not work.
<s:List width="682" height="524" dataProvider="{data.Showtimes.Location.@name}"/>


---------------------------------------------------------------------- ---------------------


External XML


-<Movies MovieID="1083">
  <LeadActors> Clifton Collins Jr.,Emma Booth, Jason Statham,Jennifer Lopez Michael Chiklis,Nick Nolte</LeadActors> 
  <Director> Taylor Hackford</Director> 
  <Genre> Crime</Genre> 
  <Synopsis>A thief with a unique code of professional ethics is double-crossed by his crew and left for dead. Assuming a new disguise and forming an unlikely alliance with a woman on the inside, he looks to hijack the score of the crew's latest heist.</Synopsis> <ReleaseDate>31/1/2556</ReleaseDate> <Trailer></Trailer> -<Showtimes>
    -<Location name="SF World Cinema" code="9909">
      -<Movie name="PARKER (E)" FilmFormat="E" CinemaType="N" Rating="15+" MainCode="PARKER_" id="0900000558">
        -<Showtime Date="02/02/2013">
          <session id="166539">14:30</session>
          <session id="166499">15:10</session>
          <session id="166540">17:00</session>
          <session id="166541">19:30</session>
          <session id="166501">21:30</session>
          <session id="166542">22:00</session>
          <session id="166556">23:30</session>
      </Movie> -<Movie name="PARKER (E/F)" FilmFormat="E" CinemaType="F" Rating="15+" MainCode="PARKER_" id="0900000557">
        -<Showtime Date="02/02/2013">
          <session id="166484">15:45</session>
          <session id="166485">18:15</session>
          <session id="166486">20:45</session>

i  just need  to  display as list , at thirt   view   subnode  data  called   "name"   


i am using wrong  call    @name  ??  or  i need add dispatcher ? 

but  i have to send with button  and  button dont have  change event , just have click.


Pls  help so important for me..



  • Currently Being Moderated
    Feb 2, 2013 9:10 PM   in reply to includee666

    Hard to say.  If you get an error, post the full stack trace.  Often, there is important clues in there.  My guess is you haven’t showed us the code that generates the error.


    When debugging XML, I use trace and toXMLString to make sure I’m at the right depth.


    There is a double-dot operater in XML “..” that gets all nodes by name regardless of depth.  That assumes you don’t reuse tag names at different depths.  So doing data..ShowTimes is different than data.ShowTimes.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points