What array?  What error?

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of donvoltz
Sent: Saturday, May 10, 2008 6:20 AM
To: [email protected]
Subject: [flexcoders] Need help with TileList ItemRenderer

 

I am trying to create a calendar of sorts that loops through a
selected month and diplays a custom Panel for each day. I have
constructed an ArrayCollection to hold the number of days for each
month and have used this as the dataProvider for a TileList component.
This functions fine. I am now trying to extend the Panel by using a
custom component that will add labels into this Window. The following
code is what I am using for my Panel component (which is also what I
have assigned to my TileList ItemRenderer).

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " layout="absolute"
creationComplete="initComp()">
<mx:Script>
<![CDATA[
import mx.controls.Label;
import
com.dynamicmedicalventures.De2ORApplication.model.AppModelLocator;
[Bindable]
private var modelLocator:AppModelLocator =
AppModelLocator.getInstance();

public function initComp():void {
var i:int;

for (i=0; i<modelLocator.callLocations.length(); i++){
var callLabel:Label = new Label();
callLabel.text = modelLocator.callLocations[i].callLocationName;
addChild(callLabel);
}

}
]]>
</mx:Script>


</mx:Panel>

Can anyone help me to determine why I am getting an error when I try
to loop through an array of objects to dynamically display these labels.

Thanks in advance for the help

Don

 

Reply via email to