开发者

Mac OS X and Adobe Air trace does not work

For some reason trace does not work on when I put trace into my ActionScript files. I use the Flex SDK to build Adobe Air applications. I am currently on Flex SDK 4.5.1 and Adobe Air 2.7.

I have checked that idl is not running, can't find a trace of it ( pun not intended ). I have also added mm.cgf to ~/Library/Application\ Support/Macromedia, that hasn't worked either.

Any other suggestions?

Update: Some suggested my app, so create basic HelloWorld.mxml

<?xml version="1.0" encoding="UTF-8"?>
<s:WindowedApplication
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.co开发者_运维百科m/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    title="Hello World">

    <fx:Script>
        <![CDATA[
            trace("Hello World");
        ]]>
    </fx:Script>

    <s:Label
        text="Hello AIR"
        horizontalCenter="0"
        verticalCenter="0"
    />

</s:WindowedApplication>

And HelloWorld.app.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
    <id>samples.flex.HelloWorld</id>
    <versionNumber>0.1</versionNumber>
    <filename>HelloWorld</filename>
    <initialWindow>
        <content>HelloWorld.swf</content>
        <visible>true</visible>
        <width>400</width>
        <height>200</height>
    </initialWindow>
</application>

But it still doesn't work. Provided the code, that by some weird chance it could be the app.


I've solved it. I found it on this website http://forums.adobe.com/thread/761395

I was trying to get trace() to work in Mac. I compiled my AIR app using the flex command line compiler "amxmlc" and included parameters -debug=false and -omit-trace-statements=false. Then i ran the application with adl your-app.xml -nodebug and i was able to get the traces into terminal.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜