Flex metadata compiler extension in FlashDevelop tutorial

Over the past two hours, I have been looking for some simple instructions on how to add my own metadata tag in as3 without success. I'm starting to think that I'm probably not looking for the right conditions.

Problem

Ultimately, I want to add custom metadata to a function that takes a function as a parameter and ensures that the function has the correct parameters.

those. I have the following function:

public function testCallback(callback:Function):void
{
    callback("test");
}

and I want to get a compiler error when I call it like this:

public function doNothing():void
{
    // doing nothing
}

public function someRandomFunction():void
    // ...
    testCallback(doNothing);
}

The way I'm going to do this is the availability of this metadata:

[Callback(paramName="callback",callbackParams="string")]
public function testCallback(callback:Function):void
{
    callback("test");
}

, , , . , flex2.compiler.util.ThreadLocalToolkit.logError(, , errorMessage); .

, . SDK (SDK-18718, SDK-26041), , (?) FlexBuilder ( FlashDevelop), qaru.site/questions/471564/... .

, , Java , , , . , .

:
A) Java? ( Flex Builder? Eclipse? ?)
B) - (swc?), FlashDevelop AS3?

!

Update

Java eclipse, Flex, IMxmlcExtension MANIFEST. , extextension = MyTest.jar FlashDevelop .

, ,

mxmlc -load-config + = obj\MyProject.xml -debug = true -incremental = true -swf-version = 10 -extension = flex_test.jar -o obj\MyProject634846490611881374

2

. , - FlashDevelop. . FlashDeveloper. , : -

3

Pilippe , , , FlashDevelop Flex SHELL (fcsh). , .

+5
2

Action Script

, , mxmlc Flex. ( ). Flash Builder, FlashDevelop, :

Flash Develop

, Phillipe, AS3 FlashDevelop Flex Compiler SHell (FCSH), . FlashDevelop , (, , ) . -, , , - : [GIFT] AS3 (ASC 2.0) flashDevelop 4.x

0

All Articles