<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Love is love, work is need.

    Pay my all effort for a memorable life story.

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      7 隨筆 :: 0 文章 :: 3 評論 :: 0 Trackbacks

    2009年5月27日 #

    II.1.Each MXML component extends,or id derived from, an existing ActionScript class.

    II.2. In an MXML component, each property that you want to be bindable needs its own [Bindable] tag.

    With ActionScript class definitions, you can mark all the class's properties as bindable with a single instance of the [Bindable] metadata tag placed before the class declaration.

    II.3.compc for libraries generation.

    ####page.256 23:22 2010-3-17

    II.4.Navigator containers / View states

    Navigator containers : Move from one view to another.
    View states: change an existing view.

    NOTE:
        Q&A
        Q:How to handling navigator container sizing?
        A:3 ways:
            1.Set the Set the navigator container's dimensions to specific pixel or percentage dimensions, and then set the nested container sizes to 100 percent height and width.Each of the nested view containers then resizes to fill the available space in the navigator container.
            2.Set the nested containers to specific pixel dimensions, and set the navigator container's 'resizeToContent' property to true.
            CAUTION:
                Setting resizeToContent to true forces the navigator container to re-measure and
    re-draw itself as the user navigates through the application. This can cause interesting
    and unintended visual effects, particularly when the navigator container has a visible border or
    background.

    II.5.Backslash and Forwardslash character

    Do not usint backslash character '\' as separator in the path to an application asset, you should always using forwardslash character '/' as separator.

    II.6.New line


    ActionScript:    '\n'
    MXML    :    "&#13;"

    II.7.ActionScript basic access control


        public   
        private
        protected    class and it subclass, note this is different from Java, which is allowed access in same package.
        internal     the default access specifier that allowed all other class which in the same package can access it.
        BUT, if above default namespace is not suit for you, you can create your namespace.
     

       III.1.To define an namespace, you have two choice: omit the URI or not, like:


        namespace myzoo;
            or
        namespace myzoo = "
        once the namespace defined, in its using scope, it can't be redefined.
        So, what the scope it control?
        e.g,:
            package org.mai {
                    namespace maizoo;  //means internal.
            }
            package org.mai {
                public namespace maizoo; //means it can be accessed by other class which it improved it.
            }

        III.2. Applying namespaces


        e.g,:
            namespace maizoo;
            class MaiClass{
                maizoo myFunction(){};
            }
            the namespace can be placed in front of variable, constant, function, but class.

        III.3.Refrencing namespaces


        Unlike the default namespaces, (public, private...etc;), which they are controled by context, the user defined namespace must be specified by user himself. Still, you can using the keyword 'use namespace' to simplicified it.(Like you did in C++!)
        use namespace maizoo;
        myFunction();
        or
        maizoo::myFunction();

    II.8.The variable scope

        ActionScript, unlike C++ or Java, doesn't have a 'block level scope', which means that if your declare a variable in a block, the variable is also available in anywhere of the function which the block belong to.
        e.g,:
        public function do:void(){
            for(var i:int = 0; i < 20 ; i++){
                var m:String = i + "xxx";
            }
            trance(m); // also avaiable here!
        }
        Because laking the block level scope variable scope, the compiler is ( almost is ) can understand how many variable is in some function, this is called 'hoisting', which can be thought as the compiler move all the variables declared to the top of an function. NOTE: the assignment will not be hositing, so the follow is easy understandable:

            trace(num);    // output NaN;
            var num:Number = 20;
            trace(num);// will outout 20.

    II.9. Default value

    DataType Value
    Boolean false
    int 0
    uint 0
    Numbwer NaN
    * undefined
    Object null
    String null
    All Other Class null

     

    II.10. is / instanceof /as

        III.1.is / instanceof    :: return Boolean.

        is : can check an object is an instance of an class or an inherit from some class or it is implement of some interface.

        instanceof: as well as 'is' but will be return false if using check an interface.

        III.2. as


        as : is return an string or null, to check an object is a member of a given data type.
        e.g,:
            var a:Sprite = new Sprite();
            trace( a as Sprite);    //[Object Sprite]
            trace( a as IEDispatch);    //[Object Sprite]
            trace( a as Number);    //null

    II.11. Dynamic class and Sealed class

    Dynamic class is a class which it's object can add method or variable at runtime. This is like javascript prototype but more strict.

    But method added by this way is not have the ability to access the private variable.(NEED CHECKED!)

    ####page 83,proAS_Flex3 23:36 2010-3-23

    II.12.Function Expressions and Statements

    Thinking following example:

    class MaiZoo{
        var maiFunc = function(){};
        function maiStateFunc(){};
    }

    var maiZoo:MaiZoo = new MaiZoo();
    maiZoo.maiFunc(); //Error in 'Strick' mode;Ok in standard mode
    maiZoo.maiStateFunc();    // Works fine in both mode.

    If you wanna call an expression function in strick mode, the workaround way is:

    maiZoo['maiFunc']();    //Guess what? like EL hah? And this is real a javascript way:)

    Both satuation above code works fine.

    Second way, you can declare whole class as 'dynamic',this way allow you call function express in strick mode, but this way will sacrifice the strick checking and if you attempt to access an undefined property for an instance,the compiler will not generate an error.(?)

        III.1.Live sope


        The different between function expression and function statement is that the function statement is exist throughtout the scope in which they are defined, INCLUDING IN THE STATEMENTS THAT APPEAR BEFORE THE FUNCTION STATEMENT!!!

    But the function expression is not. So the following code will generate an error:

                expressionFunc(); //Runtime Error

                var expressionFunc:Function= function(){};

        and if we using:
                statementFunc(); //OK
                function statementFunc():void{};

        III.2. Delete property


            dynamic class Obj{};
            var myObj:Obj = new Obj();
            myObj.expressionFunc = function(){};
            delete myObj.expressionFunc;
            myObj.expressionFunc();            //Error; cause the function is 'anonymous', it's just GONE!
            //BUT..
            function stateFunc():void{}
            myObj.stateFunc = stateFunc;
            delete stateFunc;        //No effect. 
            stateFunc();        //Still working, lalala~
            delete myObj.stateFunc;
            myObj.steteFunc();        // Error!
            stateFunc();        //Haha, Nondead!

    II.13.Function ! Function! Function!

        All thing is object, so all the function call is pass by refrence, BUT, for primer type, they works as if pass by value.

        Have fixed argument(s) function has an imply object called 'arguments'
            1. arguments is an array that contain all actual arguments the function be passed.
            2. arguments.length
            3. arguments.callee is an refrence to the function itself. so if you are using an anonymous function, you know how to do if you want do a recursion.
            4. if you named your parameter 'arguments', it will overwrite the arguments, so you cry means nothing!
            ...(rest)
            this is an way to define an function that not have the fixed but variable arguments.
            e.g,:
            function doX(... args):void{}
            also, you can using (rest) as the way 'arguments' do in normal function, but they DONT HAVE an 'callee' attribute.
    ####page 101,proAS_Flex3 23:36 2010-3-23 22:19 2010-3-24


    First test for write blog using m$ live writer.

    If this setting works fine, I’ll see the result porperly.

    The web service of metaBlogAPI is:

    http://yourname.blogjava.net/services/metaweblog.aspx

    and next next next…

    posted @ 2009-10-12 11:49 Mai Qi 閱讀(176) | 評論 (0)編輯 收藏

    When you have some work experience about programming, you’ll find that you can’t inform normal company’s interview questions like “How to parse an int value from a String”. You know how to do that but it doesn’t mean you can write down the answer rightly. This is very common. OK, frankly speaking, I’m talk about myself. I was face that badly feeling interview yesterday,  and on the same day I’m also losing something that I was thought that can’t be lose so quickly and… that day is coming, I have nothing to argue, no power for complain, because I’m the badly of all. Obversely, the follower thing is defeat me badly. One should never arrogant even when he is at his best, and what time is my best? I don’t know. When that day is coming, please note me let me know that, so I can happy and enjoy it secretly. No more speaking, I’m sad, really, deeply...
    God. Now I know why so many person calls you name. Some one always needs some powerful person that helps them from their life time. But where are you? If you can let me know the location that you are, please send me the axis by email, so I can google map it by firefox...


    posted @ 2009-05-27 13:51 Mai Qi 閱讀(159) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲国产成人久久精品app| 亚洲黄片手机免费观看| 最近免费中文字幕大全免费版视频| 国产亚洲精aa成人网站| 成人一区二区免费视频| 日本亚洲成高清一区二区三区| 亚洲欧洲国产经精品香蕉网| 一级成人a做片免费| 亚洲精品无码激情AV| 91免费福利视频| 亚洲一区二区三区高清| 国产99精品一区二区三区免费| 色噜噜亚洲精品中文字幕| 亚洲AV无码资源在线观看| **实干一级毛片aa免费| 亚洲成人在线电影| 亚洲天堂免费在线视频| 日本红怡院亚洲红怡院最新| 99蜜桃在线观看免费视频网站| 曰韩亚洲av人人夜夜澡人人爽| a级毛片高清免费视频| 亚洲成人午夜在线| 手机在线毛片免费播放| 亚洲国产成人va在线观看网址| 中文毛片无遮挡高潮免费| 亚洲乱妇老熟女爽到高潮的片| 亚洲VA综合VA国产产VA中| 青青操在线免费观看| 亚洲国产精品张柏芝在线观看| 国产成人高清精品免费鸭子| 国产免费福利体检区久久| 无码专区—VA亚洲V天堂| 久久久www成人免费毛片| 亚洲一级黄色大片| h视频在线观看免费网站| 亚洲精品无码久久久久久| 亚洲色大成网站www永久一区 | 日本一卡精品视频免费| 亚洲色最新高清av网站| 亚洲中文字幕在线第六区| AA免费观看的1000部电影|