Git Product home page Git Product logo

fwlog's Introduction

FWLog - Fireworks Logging

This library is intended to make developing custom panels for Adobe Fireworks a little bit easier. 
It provides a library of actionscript functions to do logging for the custom panels you develop while they execute inside the Fireworks javascript execution environment.
This is a library of actionscript loggin functions which wrap javascript logging functions.


Get Started

Reference the FWLog.swc contained in the bin folder from your Flash Builder project.
Instantiate the FireworksFileIO project like so:

	var message = "hello Fireworks";

	var fw:FireworksLog = new FireworksLog("console.log");
	fw.log("message: ", message);									//at the moment, the log function can take a maximum of two arguments
	
The API is below:

	public function log(message:String, value:String = ""):void
	
	
The Problem

Fireworks has a 2-tiered development workflow. 
Panels must be written in actionscript. At the same time the Fireworks API provided by Adobe to manipulate and extend Fireworks is javascript.
To execute that javascript, panels must pass it as a string argument to the MMExecute function, eg. MMExecute('alert("hi");');

Besides the development workflow challenges this creates, there are also problems when passing strings as arguments to the javascript functions you will be executing.
This is because those javascript functions are also being passed as a string, so you get into a nested string situation and all the annoyances that this entails like having to escape characters, and writing things like this:

actionscript...

	var greeting = "hello";
	MMExecute('alert("greeting: ' + greeting + '");');

the string being passed to MMExecute is javascript.

This nested string situation is a little bit nightmarish, especially when you have to start dealing with multiple variables, and newlines, which have to be encoded and escaped on their journey through this string maze.
This library takes care of all that for you and lets you just call a log function with the variables and strings you want output.


Released under the BSD License.		

fwlog's People

Contributors

mitya777 avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.