Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

air.trace() not working

$
0
0

Hi all,

 

Someone had a similar problem here: http://forums.adobe.com/thread/750219?tstart=0  They managed to solve it, I started adding to post but thought it best to start a brand new post.

 

I've tried what they've suggested and made a file called mm.cfg in my %HomeDrive%%HomePath% directory (c:\users\james) the contents of which are:

 

     ErrorReportingEnable=1
     TraceOutputFileEnable=1
     TraceOutputFileName=c:\logs\flashlogs.txt
     MaxWarnings=50

 

but I still don't get a log file from air.trace().  Though in C:\Users\James\AppData\Roaming\Macromedia\Flash Player  there's a file flashlog.txt with:

     Warning: Not a known player download type, app:/HelloWorld.html

 

I'm running Vista and I'm using AIRSDK 2.5.  I call my hello world  application from the command prompt with " adl HelloWorld-app.xml "  I  get a window of correct dimensions with " Hello World! " as expected, but  no console message.  What am I doing wrong please?  I've been looking  for about a day now at how to get the air.trace messages but neither  those nor the introspector statements work.

 

Thank you!!

James

 

 

 

The  4 files are in:

C:\AIRHelloWorld

 

The 4 files are:

HelloWorld-app.xml

HelloWorld.html

AIRAliases.js

AIRIntrospector.js

 

 

My  code for HelloWorld-app.xml and HelloWorld.html is below.   AIRAliases.js and AIRIntrospector.js  are copied straight from AIRSDK

 

HelloWorld-app.xml

 

<!-- Tutorial at: http://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html -->

 

<application xmlns="http://ns.adobe.com/air/application/2.5">

 

    <id>examples.html.HelloWorld</id>   
    <versionNumber>0.1</versionNumber>   
    <filename>HelloWorld</filename>
    <initialWindow>
        <content>HelloWorld.html</content>
        <visible>true</visible>
        <width>240</width>
        <height>320</height>
    </initialWindow>

 

</application>

 

 

 


<!-- To RUN AND TEST the application get a console window (type cmd into search box of Windows vista)
type:
cd c:\AIRHelloWorld

 

When you have it in the directory of "c:\AIRHelloWorld" then type:
adl HelloWorld-app.xml

 

You'll get a window showing the app and also apparently the console window displays the
message resulting from the air.trace() call in the html, but I never see this -->

 

 

HelloWorld.html

 

<html>
<head>
    <title>Hello World</title>
    <!-- In the <head> section of the HTML, import the AIRAliases.js file: -->
    <script src="AIRAliases.js" type="text/javascript"></script>
    <script type="text/javascript" src="AIRIntrospector.js"></script>

 

    <!-- JavaScript function to handle the onLoad event:  -->
    <script type="text/javascript">
    function appLoad(){
        air.trace("Hello World - debug comment");  /*The appLoad() function simply calls
           the air.trace() function. The trace message print to the command
           console when you run the application using ADL. Trace statements
           can be very useful for debugging.*/

 

        air.Introspector.Console.log("Hello World - Introspector debug comment");
  
    }
    </script>


</head>
<body on load="appLoad()">
    <h1>Hello World!</h1>
</body>
</html>


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>