5 Replies Latest reply on Mar 17, 2010 8:42 AM by bnther

    Still learning-- So How do I view the sample code to see where I made mistakes

    123tron

      Hi Guys,

       

      I know whats up with these newbies... We I am not a coder by trade mostly because I am a horrible type and can hardly get syntax correct. All this to say I have been working on example 2 and dont know what I typed wrong but the code said I could not have more that one dg variable. I wanted to view the corrected code to see where I made a mistake but I could not find out how to load it.  Where do I find it ? How do I load it and how to I correct my mistakes...

       

      Also is there more info I should be reading some where ?

       

      Thanks !

        • 1. Re: Still learning-- So How do I view the sample code to see where I made mistakes
          bnther Level 1

          I'm assuming you have the downloaded file -- you will go into Flex and  do 'New - Flex Project'.  Once the new form opens up, you will uncheck the default location and then browse.  You'll enter the MXML file above it and if you've got your path right, Finish will be light up and your good to go.

           

          I asked this same question, just today on a different forum : )

           

          Good Luck

          • 2. Re: Still learning-- So How do I view the sample code to see where I made mistakes
            123tron Level 1

            I have to be honest and say that I don't get it. Is there a screen shot PDF out there that shows how to load the answer code ? I really need step by step instuctions... I am completely new. Also the answer code has the same project name. How do I distinguish ?

             

             

            Thanks for trying though... I know I am really in the baby stages

            • 3. Re: Still learning-- So How do I view the sample code to see where I made mistakes
              bnther Level 1

              Are you referring to 'Excercise 2' ?

              If so, then I'll paste the code for you.

              • 4. Re: Still learning-- So How do I view the sample code to see where I made mistakes
                123tron Level 1

                yes it was exercise two.. Also does any one know of any sample code where I can make a simple photo gallery ?

                • 5. Re: Still learning-- So How do I view the sample code to see where I made mistakes
                  bnther Level 1

                  Well I hope that this helps.  I will sa file navigating with Flex is one thing that has always felt 'must unnatural'.  To be perfectly honest, there are days that I find it incredibly perplexing.

                   

                  Also, just to reiterate, if you need to look at the whole project you can download the Ex2_solution.zip and then from Flex - import new project - and then select the zip file.  Don't try and unzip it first, but rather import it in the .zip format.  If it gives you greif saying that there is already a file like this open, then Google 'Flex -- switch workspace'.  Like I mentioned, it is 'most unnatural' but it is do-able.

                   

                  Here's the AdobeODT.MXML file:

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                      layout="absolute" backgroundColor="#FFFFFF">
                     
                      <mx:Script>
                          <![CDATA[
                              import mx.events.ListEvent;
                             
                              private function changeHandler(event:ListEvent):void{

                   

                              }

                   

                          ]]>
                      </mx:Script>
                     
                      <mx:Array id="roomList">
                          <mx:String>Colorado Room</mx:String>
                          <mx:String>Denver Room</mx:String>
                          <mx:String>Mile High Room</mx:String>
                          <mx:String>Greeley Room</mx:String>
                      </mx:Array>

                   


                      <mx:Label text="XYZ Convention Center"
                          x="10" y="10"        
                          fontSize="21" fontWeight="bold"/>
                      <mx:Text x="10" y="41"
                          text="111 49th Ave, Denver, CO     80634"/>
                      <mx:Text text="Phone: 303-555-1212" x="208" y="41"/>
                      <mx:Text text="Fax: 303-555-1234" x="345" y="41"/>   
                      <mx:Label text="Room Reservation System"
                          fontWeight="bold" fontSize="14"
                          x="10" y="72"/>   
                      <mx:Label text="Room Available:" x="10" y="108"/>
                      <mx:List id="dg" x="10" y="134" width="250"
                          dataProvider="{roomList}"
                          itemClick="changeHandler(event)"/>

                   


                  </mx:Application>