6 Replies Latest reply on Jul 25, 2006 10:55 AM by ntsiii

    Repeater vanishes

    leotemp Level 1
      Ok so im not sure what happened but somehow a repeater i am using just stoped worknig and i havent changed anything about it since it did work, i did add a 3rd repeater and its around then that the second repeater in the document stoped working. I have tried removing the 3rd repeater and this changes nothing, the 3rd repeater is not showing up visibly either and the app doesnt throw any errors, these are relativly simple repeaters fed from an HTTPservice xml datasource. Whats happening on screen is the tabs appear properly generated by the repeater for a split second, then poof they disapear.. really wierd.. someone please help!

      Document source is below but not the xml source as the data is confirmed to be working and there are no errors generated:

        • 1. Re: Repeater vanishes
          leotemp Level 1
          Sigh, i cant past the source as it says it too big, is there any option for posting source somewhere i swear ive seen that somewhere...
          • 2. Re: Repeater vanishes
            ntsiii Level 3
            For some reason the Flex 2 fourms do not have the Attach Code functionality.

            Slim the code down to the minimum necessary to replicate the problem. Half the time, just doing that will show you where the problem is.

            Tracy
            • 3. Re: Repeater vanishes
              leotemp Level 1
              This should be a trimed down version of the source, i removed alot of functions and my HTTPServices as well as everything else that wasnt the repeaters so i could post it but im worried the problem may be related to the source i omitted but at least its a start.. i left the one function that interacts with the mentioned repeaters.. Also there were no states or transitions in this component.

              <?xml version="1.0" encoding="utf-8"?>
              <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="770" height="465" >

              <mx:Script>
              <![CDATA[
              function incUp(m,a):String {
              var returnInt=(a*(m));
              return returnInt;
              }
              ]]>
              </mx:Script>

              <mx:Repeater id="rep01" dataProvider="{mx.utils.ArrayUtil.toArray(this.pagesStream.lastResult.pages.name)}">
              <mx:Canvas y="{Number(incUp(rep01.currentIndex,15))}" height="20" left="5" right="5">
              <mx:Canvas width="8" height="8" left="5" cornerRadius="2" borderStyle="solid" borderColor="#808080" borderThickness="1" backgroundColor="#808080" dropShadowEnabled="true" dropShadowColor="#808080" shadowDistance="1" verticalCenter="0">
              </mx:Canvas>
              <mx:LinkButton label="{rep01.currentItem}" left="15" verticalCenter="1" height="15" right="2" themeColor="#ffffff" textAlign="left" textIndent="2"/>
              </mx:Canvas>
              </mx:Repeater>

              <mx:Repeater id="rep02" dataProvider="{mx.utils.ArrayUtil.toArray(this.allcatsStream.lastResult.pages.name)}"> <mx:Canvas width="100" height="20" top="2" borderStyle="solid" borderColor="#808080" cornerRadius="4" borderThickness="1" backgroundColor="#c0c0c0" left="{Number(incUp(rep02.currentIndex,106))}"> <mx:LinkButton label="{rep02.currentItem}" horizontalCenter="0" bottom="0" fontFamily="Arial" fontSize="12" width="98" height="18" cornerRadius="4" themeColor="#ffffff" fillColors="#c0c0c0"/>
              </mx:Canvas>
              </mx:Repeater>

              <mx:Repeater id="rep03" dataProvider="{mx.utils.ArrayUtil.toArray(this.topprodsStream.lastResult.products.name)}" >
              <mx:Canvas y="{Number(incUp(rep03.currentIndex,5))}" left="7" width="149" height="170">
              <mx:Canvas height="30" borderStyle="solid" borderColor="#808080" borderThickness="1" cornerRadius="8" backgroundColor="#808080" top="0" left="0" width="149">
              </mx:Canvas>
              <mx:Canvas height="149" top="13" borderStyle="solid" borderColor="#808080" backgroundColor="#f7f7f7" borderThickness="1" horizontalScrollPolicy="off" verticalScrollPolicy="off" dropShadowColor="#C0C0C0" dropShadowEnabled="false" shadowDistance="1" left="0" width="149">
              <mx:Image left="0" top="0" right="0" bottom="0" scaleContent="true" source="img/products/tileprod1.jpg"/>
              </mx:Canvas>
              <mx:Canvas height="20" borderStyle="solid" borderColor="#808080" borderThickness="1" cornerRadius="0" backgroundColor="#808080" top="142" left="0" width="149" dropShadowColor="#C0C0C0" dropShadowEnabled="true" shadowDistance="1">
              <mx:Canvas height="20" bottom="-4" borderStyle="solid" borderColor="#808080" cornerRadius="4" borderThickness="1" backgroundColor="#c0c0c0" left="5" right="5" themeColor="#ffffff">
              <mx:LinkButton label="{rep03.currentItem}" bottom="0" fontFamily="Arial" fontSize="12" height="18" cornerRadius="4" themeColor="#ffffff" fillColors="[#f4f4f4, #f4f4f4]" left="0" right="0"/>
              </mx:Canvas>
              </mx:Canvas>
              </mx:Canvas>
              </mx:Repeater>

              • 4. Re: Repeater vanishes
                ntsiii Level 3
                I can't run that though, there won't be any data. Hard code the dataProviders.
                • 5. Re: Repeater vanishes
                  leotemp Level 1
                  ok im not sure if this is proper posting a url in here but i can't think of any other way to post the source so here is a link to the mxml document and the datasources are pointed at the live server so you should be able to leave it as is as long as you use the crossdomain as well..

                  mxml component
                  http://andeanstone.alohademos.com/crossdomain.xml
                  crossdomain xml file
                  http://andeanstone.alohademos.com/content.test.mxml

                  I hope that works for you, i was just looking at the server and watched as the tabs vanished again, it seems to happen right befor the text content from the data source loads..

                  leo
                  • 6. Re: Repeater vanishes
                    ntsiii Level 3
                    The links won't help. I am trying to help you to solve this yourself by isolating the problems in to a small testable app.

                    Take the sample app you posted above and make it runnable stand-alone by hard-coding some data.