チェンジセット 835

差分発生行の前後
無視リスト:
コミット日時:
2008/07/13 23:51:17 (4 ヶ月前)
コミッタ:
mzp
ログメッセージ:

ABC以外は、ツリーに情報が表示されるようにした

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/ByteCodeDisassembler/Controller.as

    r834 r835  
    1010 
    1111    public class Controller{ 
    12         public var frame : Array = []; 
    13         public var onUpdate : Function; 
     12        public var frame : Array  = []; 
     13        public var info  : Object = []; 
     14        public var onUpdateTree : Function; 
     15        public var onUpdatePanel : Function; 
    1416 
    1517        private var stream : URLStream; 
     
    4042                    switch (tag) { 
    4143                    case 82: { 
    42                         frame.push({label:'abc'}); 
     44                        frame.push({label:'abc',tag:'abc',children:[ 
     45                                                                    1,2,3 
     46                                                                    ]}); 
    4347                    } 
    4448                        break; 
    4549                         
    4650                    default: { 
    47                         frame.push({label:'????',tag:tag,length:length}); 
     51                        frame.push({label:'???',tag:tag,length:length}); 
    4852                        swf.seek(length); 
    4953                    } 
     
    5660                trace(e); 
    5761            } 
    58             this.onUpdate(); 
     62            this.onUpdateTree(); 
    5963        } 
    6064 
    6165        private function onIOError() : void{ 
    6266        } 
     67 
     68        public function showInfo(item : Object):void{ 
     69            //      if(item.label == '???'){ 
     70            this.info = item; 
     71            //      } 
     72            this.onUpdatePanel(); 
     73        } 
    6374    } 
    6475} 
  • air/ByteCodeDisassembler/Main.mxml

    r834 r835  
    1111private function init() : void{ 
    1212  var self : Object = this; 
    13   controller.onUpdate = function() : void{ 
     13  controller.onUpdateTree = function() : void{ 
    1414    self.tree.dataProvider = controller.frame; 
    1515  }; 
    16 } 
    1716 
    18 private function open() : void{ 
    19   controller.disassemble(this.path.text); 
     17  controller.onUpdatePanel = function() : void{ 
     18    trace('update'); 
     19    switch(controller.info.tag){ 
     20    case 'abc': 
     21        self.abc.visible = true; 
     22        self.etc.visible = false; 
     23        break; 
     24    default: 
     25        self.abc.visible = false; 
     26        self.etc.visible = true; 
     27        self.etc_tag.text = controller.info.tag; 
     28        self.etc_length.text = controller.info.length; 
     29    } 
     30  } 
    2031} 
    2132    ]]> 
    2233  </Script> 
    2334  <HBox width="100%" height="20"> 
    24     <TextInput width="100%" id="path" enter="open()" text="http://localhost:3001/swf/Main.swf"/> 
     35    <TextInput width="100%" id="path" enter="controller.disassemble(this.path.text);" text="http://localhost:3001/swf/Main.swf"/> 
    2536    <Button label="..." /> 
    2637  </HBox> 
    2738  <HBox width="100%" height="100%"> 
    28     <Tree width="200" height="100%" id="tree"/> 
    29     <Button label="hoge" /> 
     39    <Tree width="200" height="100%" id="tree" change="controller.showInfo(this.tree.selectedItem)"/> 
     40    <HBox id="abc" visible="false"></HBox>     
     41    <HBox id="etc" visible="false" width="100%"> 
     42     <Form width="100%"> 
     43       <FormHeading label="ABC" /> 
     44       <FormItem label="tag"><Label id="etc_tag" /></FormItem> 
     45       <FormItem label="length"><Label id="etc_length" /></FormItem> 
     46     </Form> 
     47    </HBox> 
    3048  </HBox> 
    3149</Application> 
  • air/ByteCodeDisassembler/Makefile

    r834 r835  
    44.PHONY: clean rascut 
    55rascut: 
    6         LC_ALL=C rascut -s Main.mxml -l ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt 
     6        LC_ALL=C rascut -s Main.mxml 
    77 
    88cleanlog: