Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Flex (http://www.flasher.ru/forum/forumdisplay.php?f=84)
-   -   странные ошибки 'undefined property dataProvider...' (http://www.flasher.ru/forum/showthread.php?t=131423)

Jean 20.10.2009 13:23

странные ошибки 'undefined property dataProvider...'
 
Всем привет,

при автоматической сборке получаю странные ошибки в классе, который является наследником ComboBox
Error: Access of possibly undefined property dataProvider through a reference with static type controls:SeparatorComboBox.

SeparatorComboBox определяет некоторые новые свойства и переопределяет старые, но dataProvider он никаким образом не касается.

Также эта ошибка появляется не всегда, а примерно через раз. К тому же локально в IDE, эта ошибка не появляется вообще

Gubber 22.10.2009 11:07

А можно код SeparatorComboBox в студию подать?

Jean 23.10.2009 12:45

Код AS3:

public class SeparatorComboBox extends ComboBox
{
        private var _disabledFunction:Function;
 
        public function SeparatorComboBox()
        {
                super();
                itemRenderer = new ClassFactory(SeparatorComboBoxItemRenderer);
                dropdownFactory = new ClassFactory(SeparatorList);
                addEventListener(DropdownEvent.OPEN, openListener);
                addEventListener(ListEvent.CHANGE, change);
        }
 
    private function change(event:ListEvent) : void
    {
            if (this.textInput.getTextField().truncateToFit())
            {
                    this.toolTip = this.text;
            } else
            {
                    this.toolTip = null;
            }
    }
 
        public function set disabledFunction(value:Function):void
        {
                _disabledFunction = value;
        }
 
        public function get disabledFunction():Function
        {
                return _disabledFunction;
        }
 
        private function openListener(event:DropdownEvent):void
        {
                var list:SeparatorList = dropdown as SeparatorList;
                if (list != null)
            list.disabledFunction = _disabledFunction;
        }
}


†‡Paladin‡† 23.10.2009 15:55

А где импорты? Может там рядом ComboBox валяется кривой.


Часовой пояс GMT +4, время: 08:24.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.