1 Reply Latest reply on May 11, 2007 1:44 PM by sank22

    Flex package

      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"
      backgroundGradientColors="[#92abd1, #206d93]"
      xmlns:local="*" >

      import mx.controls.Label;
      import flash.net.navigateToURL;


      <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:List width="80%" height="227" horizontalCenter="0" y="41"></mx:List>


      and my package looks like this:
      public class AOCat
      private var _category:uint = 0;

      public var modelValid:Boolean = false;

      public var categories:Array;
      public function AOCat()
      categories =
      "test", "test2", "test3"

      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 :(
        • 1. Re: Flex package
          Hi, please write me the line no.35. where is it located?

          Also what i see here is, dataProvider="{AOCat.categories}"

          you are calling Class Name.field name and property name. you should create object for class AOCat. Then use that object to call field or property name.

          As "categories" & category is not static field or property, you can not use

          That is why you are getting the error messge.

          I think you create object like var myobj:AOCat=new AOCat();