actionscript-3frameworksflash-cs5swc

Exported SWC doesn't preserve auto-complete functions' parameters' names


I am using Flash CS5 and I have created a large, rarely changing framework that I don't want to be recompiled every time I use it in my projects.

I must be doing something wrong because the "auto-complete" functionality doesn't show the names of the parameters of the functions.

For example, I have a function:

public class Hey {
    public function show(name:String, num:Number, data:Array):void {...}
}

I export the SWC file and when I import it into another project, then the auto-complete for this function shows :

show(arg0:String, arg1:Number, arg2:Array):void

So, instead of "name", "num" and "data" I get "arg0", "arg1" and "arg2".

I have downloaded other SWC files and the auto-complete gets the names correctly.

Am I doing something wrong at export-time?


Solution

  • I suppose you compile with debug=false but should be debug=true to keep all necessary data in swc including arguments names.

    Optimizing libraries means to remove debugging and other code from the library prior to deployment. For normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want to debug against the library during development, so you will need the debug code inside the library. And, when you compile the release version of your application, the compiler will exclude debug information as it links the classes from the library.

    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ad5.html