2011-05-06 81 views
1

我想知道我应该把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 

回答

0

mx_internal应该没有点。

+0

@ Timofei我的google mx_internal后来我才知道,在everyprogram,也有一些是他们已经加入到mx_internal像super.mx_internal – 2011-05-06 20:33:00

+0

@Siddhesh贾达夫你为什么需要超级这里使用?尝试删除点 – 2011-05-06 20:41:00

0

每次访问它时,都不必引用mx_internal命名空间。您可以将其导入课程中。使用的语句是这样的:

import mx.core.mx_internal; 
use namespace mx_internal; 

然后重新写你这样的代码:

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 
+0

嗨朋友我试过了,我geting错误在我的变量说“该类型没有找到或不是编译时常量:DialogBu​​tton”这是var我得到错误公共var _DialogBu​​ttons_DialogBu​​tton1:DialogBu​​tton; – 2011-05-06 21:06:54

+0

@Siddhesh Jadhav该类来自您发布的原始代码。我假设DialogBu​​tton是您创建的自定义类,请确保它已导入。 – JeffryHouser 2011-05-07 02:12:48