1 Reply Latest reply on Jan 26, 2009 8:17 PM by Newsgroup_User

    Day One, Lesson Two Problem

    joemacdoakes
      It's only day one, and I've spent almost the entire day trying to figure out why one line of code doesn't work. Or I think it's one line. In
      Use the variable as the dataProvider for the List control
      (6) Add a dataProvider property and bind roomList using curly braces.
      dataProvider="{roomList}"
      I'm supposed to see the box populated with rooms at this convention center.
      Nope.
      I've been trying to figure this out for most of a day and it seems that this is way insane. I should see the List control populated with the values from the Array, but all I get is errors, the most recent is parse errors. Or other errors when I try this or that (since I don't come from the coder world, this or that is the best I can do). I even went down to item 10, "adding an itemClick", and carefully copied that code and it still doesn't work. So, see the attached code (which is a bit different from your example since I had to specify a font size, which your example doesn't and all text would end up 21 point, which is NOT what your example shows).
        • 1. Re: Day One, Lesson Two Problem
          Level 7
          Your problem is this tag:

          <mx:List id=3D"dg" x=3D"10" y=3D"134" width=3D"250"/>
          dataProvider =3D "{roomList}"

          You have the closing brace before the dataProvider attribute.

          You should have this:

          <mx:List id=3D"dg" x=3D"10" y=3D"134" width=3D"250"
          dataProvider =3D "{roomList}" />


          --=20
          Nancy Gill
          Adobe Community Expert
          Author: Dreamweaver 8 e-book for the DMX Zone
          Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
          Technical Editor: Dreamweaver CS3: The Missing Manual,
          DMX 2004: The Complete Reference, DMX 2004: A Beginner's Guide
          Mastering Macromedia Contribute
          Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web =
          Development


          "joemacdoakes" <webforumsuser@macromedia.com> wrote in message =
          news:glksv6$i4h$1@forums.macromedia.com...
          > It's only day one, and I've spent almost the entire day trying =
          to=20
          > figure out why one line of code doesn't work. Or I think it's one =
          line. In=20
          > Use the variable as the dataProvider for the List control=20
          > (6) Add a dataProvider property and bind roomList using curly braces.
          > dataProvider=3D"{roomList}"
          > I'm supposed to see the box populated with rooms at this convention =
          center.=20
          > Nope.=20
          > I've been trying to figure this out for most of a day and it seems =
          that this=20
          > is way insane. I should see the List control populated with the =
          values from=20
          > the Array, but all I get is errors, the most recent is parse errors. =
          Or other=20
          > errors when I try this or that (since I don't come from the coder =
          world, this=20
          > or that is the best I can do). I even went down to item 10, "adding an =

          > itemClick", and carefully copied that code and it still doesn't work. =
          So, see=20
          > the attached code (which is a bit different from your example since I =
          had to=20
          > specify a font size, which your example doesn't and all text would end =
          up 21=20
          > point, which is NOT what your example shows).
          >=20
          >=20
          > <mx:Application xmlns:mx=3D" http://www.adobe.com/2006/mxml" =
          layout=3D"absolute"=20
          > backgroundColor=3D"#FFFFFF" >
          > =20
          > <mx:Array id=3D"roomList">
          > <mx:String>Wall Street Room</mx:String>
          > <mx:String>Lower East Side Room</mx:String>
          > <mx:String>Soho Room</mx:String>
          > <mx:String>Tribeca Room</mx:String>
          > =20
          > </mx:Array>
          > =20
          > <mx:Label x=3D"10" y=3D"10" text=3D"Kulp Convention Center"=20
          > fontWeight=3D"bold" fontSize=3D"21"/>
          > <mx:Text x=3D"10" y=3D"41"=20
          > text=3D"411 East Tenth Street, NY, NY 10009" fontSize=3D"10"/>
          > <mx:Text x=3D"227" y=3D"41"=20
          > text=3D"Phone: 212-505-5672" fontSize=3D"10"/>
          > <mx:Text x=3D"360" y=3D"41"=20
          > text=3D"Fax: 212-505-5672" fontSize=3D"10"/>
          > <mx:Label x=3D"10" y=3D"72"=20
          > text=3D"Room Reservation System" fontSize=3D"14"/>
          > <mx:Label x=3D"10" y=3D"108"=20
          > text=3D"Rooms Available:" fontSize=3D"10"/>
          > <mx:List id=3D"dg" x=3D"10" y=3D"134" width=3D"250"/>
          > dataProvider =3D "{roomList}"
          >