1

i want to know what i should put befor .mx_internal

override public function initialize() : void
    {
        var target:DialogButtons;
        var watcherSetupUtilClass:Object;
        .mx_internal::setDocumentDescriptor(_documentDescriptor_);
        var bindings:* = _DialogButtons_bindingsSetup();
        var watchers:Array;
        target;
        if (_watcherSetupUtil == null)
        {
            watcherSetupUtilClass = getDefinitionByName("_components_DialogButtonsWatcherSetupUtil");
            var obj1:* = watcherSetupUtilClass;
            obj1.watcherSetupUtilClass["init"](null);
        }
        _watcherSetupUtil.setup(this, function (param1:String)
        {
            return target[param1];
        }// end function
        , bindings, watchers);
        var i:uint;
        while (i < bindings.length)
        {

            Binding(bindings[i]).execute();
            i = (i + 1);
        }
        mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
        mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
        super.initialize();
        return;
    }// end function

2 Answers2

0

mx_internal should be without dot.

Timofei Davydik
  • 7,244
  • 7
  • 33
  • 59
0

You don't have to reference the mx_internal namespace every time you access it. You can just import it into the class. Use statements like this:

import mx.core.mx_internal;
use namespace mx_internal;

Then re-write your code like this:

override public function initialize() : void
    {
        var target:DialogButtons;
        var watcherSetupUtilClass:Object;
// line commented to snow the mx_internal less code
//        .mx_internal::setDocumentDescriptor(_documentDescriptor_);
        setDocumentDescriptor(_documentDescriptor_);
        var bindings:* = _DialogButtons_bindingsSetup();
        var watchers:Array;
        target;
        if (_watcherSetupUtil == null)
        {
            watcherSetupUtilClass = getDefinitionByName("_components_DialogButtonsWatcherSetupUtil");
            var obj1:* = watcherSetupUtilClass;
            obj1.watcherSetupUtilClass["init"](null);
        }
        _watcherSetupUtil.setup(this, function (param1:String)
        {
            return target[param1];
        }// end function
        , bindings, watchers);
        var i:uint;
        while (i < bindings.length)
        {

            Binding(bindings[i]).execute();
            i = (i + 1);
        }
// lines commented to snow the mx_internal less code
//        mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
 //       mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
        _bindings = _bindings.concat(bindings);
        _watchers = _watchers.concat(watchers);
        super.initialize();
        return;
    }// end function
JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • hi friend i tried it and i am geting error at my variable saying "the type was not found or was not compile-time constant:DialogButton" this is var i am getting error public var _DialogButtons_DialogButton1:DialogButton; – Siddhesh Jadhav May 06 '11 at 21:06
  • @Siddhesh Jadhav That class comes from the original code you posted. I assume that DialogButton is a custom class you created.Make sure it is imported. – JeffryHouser May 07 '11 at 02:12