MadamZuZu
05-11-2007, 08:58 PM
hi :)
i keep getting this error:
1119: Access of possibly undefined property categories through a reference with static type Class. AOHotSpot.mxml AOHotSpot line 35 May 11, 2007 3:55:13 PM 221
i'v never tried classes in Flex before, but basically what i want to try and do is define categories in a class, and have the maina pplication populate a combo box based on it.
here is my main application code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientColors="[#92abd1, #206d93]"
xmlns:local="*" >
<mx:Script>
<![CDATA[
import mx.controls.Label;
import flash.net.navigateToURL;
]]>
</mx:Script>
<mx:Panel width="70%" height="70%" layout="absolute" horizontalCenter="0" verticalCenter="-7.5">
<mx:HBox width="80%" height="33" horizontalAlign="center" verticalAlign="middle" top="0" horizontalCenter="-0.5">
<mx:Label text="AO Hotspot Category:" fontWeight="bold"/>
<mx:ComboBox></mx:ComboBox>
<mx:ComboBox
id="employeeDepartment"
dataProvider="{AOCat.categories}"
selectedIndex="{AOCat.category}"
change="{AOCat.category=employeeDepartment.selectedIndex;}"
/>
</mx:HBox>
<mx:List width="80%" height="227" horizontalCenter="0" y="41"></mx:List>
</mx:Panel>
</mx:Application>
and my package looks like this:
package
{
public class AOCat
{
private var _category:uint = 0;
[Bindable]
public var modelValid:Boolean = false;
[Bindable]
public var categories:Array;
public function AOCat()
{
categories =
[
"test", "test2", "test3"
];
}
[Bindable]
public function get category():uint
{
return _category;
}
public function set category(category:uint):void
{
_category = category;
}
public function get categoryName():String
{
return categories[_category];
}
}
}
do i need some sort of a include or something?
please ehlp :(
i keep getting this error:
1119: Access of possibly undefined property categories through a reference with static type Class. AOHotSpot.mxml AOHotSpot line 35 May 11, 2007 3:55:13 PM 221
i'v never tried classes in Flex before, but basically what i want to try and do is define categories in a class, and have the maina pplication populate a combo box based on it.
here is my main application code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientColors="[#92abd1, #206d93]"
xmlns:local="*" >
<mx:Script>
<![CDATA[
import mx.controls.Label;
import flash.net.navigateToURL;
]]>
</mx:Script>
<mx:Panel width="70%" height="70%" layout="absolute" horizontalCenter="0" verticalCenter="-7.5">
<mx:HBox width="80%" height="33" horizontalAlign="center" verticalAlign="middle" top="0" horizontalCenter="-0.5">
<mx:Label text="AO Hotspot Category:" fontWeight="bold"/>
<mx:ComboBox></mx:ComboBox>
<mx:ComboBox
id="employeeDepartment"
dataProvider="{AOCat.categories}"
selectedIndex="{AOCat.category}"
change="{AOCat.category=employeeDepartment.selectedIndex;}"
/>
</mx:HBox>
<mx:List width="80%" height="227" horizontalCenter="0" y="41"></mx:List>
</mx:Panel>
</mx:Application>
and my package looks like this:
package
{
public class AOCat
{
private var _category:uint = 0;
[Bindable]
public var modelValid:Boolean = false;
[Bindable]
public var categories:Array;
public function AOCat()
{
categories =
[
"test", "test2", "test3"
];
}
[Bindable]
public function get category():uint
{
return _category;
}
public function set category(category:uint):void
{
_category = category;
}
public function get categoryName():String
{
return categories[_category];
}
}
}
do i need some sort of a include or something?
please ehlp :(