Air Logger Erros

General Discussion of Scripting for Flex, Flash & CS SDK

Moderators: Tom, Kukurykus

cameronmcefee

Air Logger Erros

Post by cameronmcefee »

Hello,

In an attempt to fix a project, I'm trying to create a new one from scratch to prove it's possible to get a simple project working. So far I have run into the exact problems in both. My current issue is that something in the Air Logger throws errors. This test project is almost entirely copied and pasted out of the Panel Developer's Guide and SDK docs, so I have no idea why it's having issues. I've been locked out of my main project for months trying to resolve problems with the environment itself, so any help is greatly appreciated.

Code: Select allCould not resolve <csxslogtargets:SocketTarget> to a component implementation.

And the project code:

Code: Select all<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="420" minHeight="342" historyManagementEnabled="false" xmlns:csxslogtargets="com.adobe.csxs.logging.targets.*">
<mx:Script>
   <![CDATA[
      import com.adobe.csawlib.photoshop.Photoshop;
      import com.adobe.photoshop.*;
    import mx.logging.*;
    private static var logConnection:LocalConnectionTarget = null;
     
      public static function init():void {
      trace('foo');
      }
   
    public static function logger():ILogger{
      if(!logConnection){
        logConnection = new LocalConnectionTarget("_test");
        logConnection.filters = ["*"];
        logConnection.level = LogEventLevel.ALL;
        logConnection.includeDate = true;
        logConnection.includeTime = true;
        logConnection.includeCategory = true;
        logConnection.includeLevel = true;
      }
      return Log.getLogger("ConnectNow");
    }
   ]]>
</mx:Script>
   <mx:VBox height="100%" width="100%">
    <mx:Button label="Run ID code" click="init()"/>      
   </mx:VBox>
  <csxslogtargets:LocalConnectionTarget level="0" includeDate="true"
                                        includeTime="true" includeCategory="true" includeLevel="true">
    <csxslogtargets:filters>
      <mx:Array><mx:String>com.adobe.csxs.*</mx:String></mx:Array>
    </csxslogtargets:filters>
  </csxslogtargets:LocalConnectionTarget>
  <csxslogtargets:SocketTarget level="0" includeDate="true"
                               includeTime="true" includeCategory="true" includeLevel="true">
    <csxslogtargets:filters>
      <mx:Array><mx:String>com.adobe.csxs.*</mx:String></mx:Array>
    </csxslogtargets:filters>
  </csxslogtargets:SocketTarget>
  <mx:TraceTarget level="0" includeDate="true"
                  includeTime="true" includeCategory="true" includeLevel="true">
    <mx:filters>
      <mx:Array><mx:String>com.adobe.csxs.*</mx:String></mx:Array>
    </mx:filters>
  </mx:TraceTarget>
</mx:Application>
cameronmcefee

Air Logger Erros

Post by cameronmcefee »

In scouring the Panel Developers Guide I found this:


Adobe® Photoshop® CS5

Brief notes for differences beetween CS4 and CS5. This guide is still referencing the CS4 documentation. It may or may not be up to date. More to come...

If you are using a JSX file for Photoshop DOM operations you must recompile with the CSXSLibrary-2.0.swc
LocalConnectionTarget and SocketTarget are no longer available. See Flex notes on using a logger and debugging your panel.
Panel's compiled with the 2.0 swc will continue to work in CS4.
All panels are now running in the AIR player engine, only one engine. This will impact any globals in the ActionScript code.
All panels using scripts are now running in one single ExtendScript engine. This will impact any globals in the ExtendScript code.
Alert.show("My string") will not work. Use Alert.show("My string", "My Title", Alert.OK, Sprite(mx.core.Application.application)) instead.
ArrayCollection is not getting stored correctly. Use Array instead.


It seems a bit counter intuitive to have a guide that back references outdated information with a single caveat in the intro, but it's what I've got to work with. I guess this problem is "solved."