1 Reply Latest reply on Sep 26, 2006 12:06 PM by witharmshigh

    Repeater issue

    witharmshigh
      i have the following code:
      <mx:State name="shippingType">
      <mx:SetProperty target="{welcomeText}" name="text" value="How would you like to have your order shipped?" />
      <mx:RemoveChild target="{orderReview}" />
      <mx:AddChild>
      <mx:HBox left="195" top="60">
      <mx:VBox>
      <mx:Repeater id="rp" dataProvider="{Application.application.storeDataObj.shippingMethods}" recycleChildren="false">
      <mx:RadioButton groupName="shippingGroup" label="{rp.currentItem.storeshipmethodname}" value="{rp.currentItem}" click="showShipOptions(event);" />
      </mx:Repeater>
      </mx:VBox>
      <mx:VBox id="shippingOptionsBox" visible="true">
      <mx:Label text="Shipping Options"/>
      <mx:Repeater id="rprates" dataProvider="{Application.application.storeDataObj.shippingRates}" recycleChildren="false">
      <mx:RadioButton groupName="shippingRatesGroup" label="{rprates.currentItem.serviceName} (${rprates.currentItem.serviceRate})" value="{rprates.currentItem.serviceRate}" />
      </mx:Repeater>
      </mx:VBox>
      </mx:HBox>
      </mx:AddChild>
      </mx:State>

      when a user selects a shipping method a call goes to my CF7 server and gets the data for that shipper. The issues occur though when after selecting one shipper and then selecting another shipper. The code all executes up to the point where it has to redraw the radio buttons for the shipper options. At this point i get the following error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.controls::RadioButton/get labelPlacement()[C:\dev\GMC\sdk\frameworks\mx\controls\RadioButton.as:171]
      at mx.controls::Button/mx.controls:Button::measure()[C:\dev\GMC\sdk\frameworks\mx\controls\B utton.as:1282]
      at mx.controls::RadioButton/mx.controls:RadioButton::measure()[C:\dev\GMC\sdk\frameworks\mx\ controls\RadioButton.as:398]
      at mx.core::UIComponent/mx.core:UIComponent::measureSizes()[C:\dev\GMC\sdk\frameworks\mx\cor e\UIComponent.as:5360]
      at mx.core::UIComponent/validateSize()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:5306 ]
      at mx.managers::LayoutManager/mx.managers:LayoutManager::validateSize()[C:\dev\GMC\sdk\frame works\mx\managers\LayoutManager.as:554]
      at mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation()[C:\dev\GMC\ sdk\frameworks\mx\managers\LayoutManager.as:637]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2()[C:\dev\GMC\sdk\framework s\mx\core\UIComponent.as:7789]
      at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()[C:\dev\GMC\sdk\frameworks \mx\core\UIComponent.as:7732]


      Any ideas what i'm doing wrong... i'm sure it's me forgetting to do something....