February 25th, 2009 by Kyle
Tags: , ,
Posted in: Flex, Flex Builder


I am not sure if this is common knowledge. I googled and didn’t find any other reference to it. (At least not in 10 minutes of googling.)

I wasn’t sure this was possible, but then I decided to look in the Flex bugbase. This is what I found:

https://bugs.adobe.com/jira/browse/SDK-5308

Whaddaya know? An enhancement request that I logged that had actually addressed this issue back in the Flex 2.x days.

Basically if you change the extension of a swc to .zip, you can open the archive with winzip (or similar) and look at the top of the catalog.xml file. You should see something like this:

<?xml version="1.0" encoding ="utf-8"?>
<swc xmlns="http://www.adobe.com/flash/swccatalog/9">
  <versions>
    <swc version="1.2" />
    <flex version="3.2.0" build="3958" />
  </versions>
 

Hopefully this will help some folks out.

Incidentally such a thing does not exist for compiled swfs. There is an enhancement request:
https://bugs.adobe.com/jira/browse/SDK-14042

If you think such a thing would be valuable, please vote for the bug.

And one more thing…I actually had an AIR app back in the pre-release of AIR 1.0 days:
http://blog.flexmonkeypatches.com/2007/11/12/flex-sdk-fds-lcds-version-detection-adobe-air-application/

You could point it at a fds/lcds war or sdk directory and it would tell you the version (of LCDS and the SDK).
Maybe this should be resurrected and updated to AIR 1.5.1 and to use this new version info (at least new since I built the original AIR app). It could also be enhanced to read version info from individual swcs as well. Oh and maybe allow users to drag and drop directories, or wars or swcs onto the app to read the info. Hmmm….if only I had the time.




3 Comments »

November 19th, 2008 by Kyle
Tags: , , , , ,
Posted in: Air, BlazeDS, Flex, Flex Builder, LCDS


OK…so I guess I kind of passed over these yesterday in my announcements. To me, the fact that there would be new releases timed with MAX was known and to anyone in the community there was probably a strong suspicion that there would at least be a new point release at MAX 2008. But in an effort to correct my oversight, here are links to the announcements by the product managers:

Matt Chotin (PM for Flex SDK) announces Flex Builder 3.0.2 and Flex SDK 3.2 (with support for AIR 1.5 and Flash Player 10).

Anil Channappa (PM for LCDS and BlazeDS) announces LCDS 2.6.1 and BlazeDS 3.2.




1 Comment »

September 24th, 2008 by Kyle
Tags: , ,
Posted in: Flex Builder


I while back, I produced an Adobe Captivate screen-cast for one of my customers showing some tricks and tips (say that 3 times fast) on using the Flex Builder 3 profiler. I kept meaning to post it to my blog and finally after getting a kick in the pants from Alex Harui and Jun Heider posting good blog entries on the same topic, here is my post.

Here is Alex’s blog post:
http://blogs.adobe.com/aharui/2008/09/using_the_flex_builder_3x_prof.html

Here is Jun’s presentation:
http://www.onflex.org/ted/2008/09/360flex-sj-2008-using-flex-builder-3.php

I think my content actually sits comfortably in between these two and as a trio they cover a lot of useful ground in making users more proficient with the Flex Builder profiler.

Read the rest of this post»




2 Comments »

July 8th, 2008 by Kyle
Tags: , , ,
Posted in: Flex, Flex Builder


A useful compiler switch to help with this is the -dump-config switch.

If you add -dump-config=c:\mycfg.xml to the compiler, it will generate a config file that represents all the compiler (either for mxmlc or compc) settings used for compilation in a Flex Builder compile and then you can use that config file in a commandline compile to do an equivalent compile.

A few notes on the generated configfile.

1. The file is not perfect. I found that the tag that was generated only had a relative path generated. It is much better if that were absolute, so before I used the config file, I changed the value for that tag to something like:

<manifest>C:\FlexBuilder2.0.1\Flex SDK 2\frameworks\mxml-manifest.xml</manifest>
 

2. For some reason the generated file has a token ${flexlib} which didn’t get resolved and filled in. I found that I could just comment out the 2 properties in the config file as they aren’t relevant to most compilations.

3. I found the easiest way to use mxmlc/compc was to copy the generated config file to the bin dir of the SDK under Flex Builder install. Then I could invoke mxmlc against the app like so:

./mxmlc -load-config+=mycfg.xml C:/myapp/src/app.mxml -output myswf.swf

4. For compc, the classes to actually compile to include in the generated swc aren’t actually output to the generated config file, so you have to add them manually (or on the commandline). I found the easiest way to do this was to add tags like below in the generated configfile

   <include-classes>
    <class>fooClass</class>
    <class>barClass</class>
  </include-classes>
 

The content for those tags comes from the project file – .flexLibProperties which looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<flexLibProperties version="1">
  <includeClasses>
    <classEntry path="fooClass"/>
    <classEntry path="barClass"/>
  </includeClasses>
  <includeResources/>
  <namespaceManifests/>
</flexLibProperties>
 

The classEntry paths translate into the class tag values.
After doing this you can run compc like this:

./compc -load-config+=mycfg.xml -output myswc.swc

HTH

-Kyle




No Comments »

So it is almost February already! Where did January go? I’ve been a bit slow out of the gate this year as far as keeping up a decent pace in posting helpful samples to my blog. Actually, I have been working on things behind the scenes, a few details of which I will reveal now. I have launched a new blog on a new domain. The content is to be all “work” related, so it will be about Flex/Flash Player/Adobe AIR, LiveCycle Data Services/Blaze DS/ColdFusion and other fun technologies. I’ve also been working on an AIR app which I hope to get out at least in a fairly stable beta form around the same time that Flex3/AIR releases. It will most likely be open source and hosted on Google Code. I will also be compiling a library of useful components, extensions to components and monkey patches to the Flex framework. This new blog and content will all be available on:

http://flexmonkeypatches.com

All old posts on http:blog.739SaintLouis.com should link to or redirect to the same content on my new site. I will leave my old site up for an undetermined length of time with the intent of transforming it content-wise into a more personal blog (time permitting.)

Regards,

-Kyle




No Comments »

April 3rd, 2007 by Kyle
Tags: , , , , , , ,
Posted in: Flex Builder


Here is an example demonstrating how to use project references to refer to source files in other projects as well as swcs in other projects.

If you take a look at this zip file, you will find that it contains 3 projects.

The first project is a normal Flex project called globalIncludes which contains an actionscript file, vars.as.
A second project, Expando, is a library project, which contains an mxml component.

  • In the properties/Project References dialogue for this project there is a checked refererence to the globalIncludes project.
  • In the properties/sourcepath for this project, I have added the root folder from the globalIncludes project. (Just click the add Folder… button and navigate to the folder.) This folder is added as ${DOCUMENTS}\globalIncludes.

Now in your Expando project you can see a “virtual directory” from the globalIncludes project labeled – [source path] globalIncludes.

In my mxml component in the Expando project, I refer to the actionscript file from the globalIncludes project by doing an include:

    include "../globalincludes/vars.as";
 

Then in my component I use a variable defined in that vars,as actionscript file to expose a version number tooltip in my component.

Note:

In the Expando project, I have right clicked on the ExpandoComboBox.mxml and selected – “Include class in library”. That way, whenever I make changes to this component, the swc will be recompiled.

My third project, Sample, is a normal project that just has an application in it.

  • In the properties/Project References dialogue for this project there is a checked refererence to the Expando project.
  • In the properties/Flex Build Path/Library Path dialogue for this project, I have added the Expando Project (click Add Project… and you will be able to select the Expando project since it is in the list of Project references.)

Now you can launch the Sample.mxml application and see that the tooltip for the ExpandoComboBox is 1.0 which has come from the vars.as actionscript file in the globalIncludes project.




1 Comment »