SapphireSteel Software: The Blog
the blog

The Mystery of the "null" Alert button

by Huw Collingbourne
Amethyst and the Flex 4 SDK
Tuesday 20 July 2010.

A user on our forums recently noticed an odd problem when running a Flex 4 application created in Amethyst. The Alert dialog didn’t seem to be behaving itself.

In short, when it appeared, its button showed this...

...whereas what he’d been expecting was this:

Where did the "OK" go to? And where did the "null" come from?

It was a mystery to us too. Amethyst certainly doesn’t mess around with Alert dialogs and the "null" doesn’t come from us. So how does one account for it?

We decided the only way to solve this problem was to track it down using Amethyst. We created a simple program with a button that fired up an Alert. Then we used the Amethyst ’Cylon’ debugger plus a few other handy tools such as its ability to Go to Definition, Find All References and debug into the depths of the Flex 4 SDK. And within a matter of a few minutes, we’d found the solution. It wasn’t what we’d expected.

Read the full story in a new development ’case study’ that we’ve just put online.

Bookmark and Share   Keywords:  stuff
Comments:0

Flex and ActionScript Libraries

by Huw Collingbourne
New video
Monday 19 July 2010.

Our latest video tutorial explains how to create or import custom library (SWC) projects into your Flex applications. Once a library is imported, you have full access to its source code so you can find all references to identifiers, go to definition or debug from your application into the library code, setting breakpoints, drilling down into variables and so on.

The video also explains how to add the Flex SDK (3 or 4) to have full access to the code for IntelliSense and debugging. Most of the features shown in this video will work in the current edge release of Amethyst Professional. There are a few features, however, which will be added in our first release candidate, which will be available soon.

Bookmark and Share   Keywords:  Amethyst  tutorial
Comments:0

Adobe Flex 4 Children and Elements

by Huw Collingbourne
How to use MX and Spark Containers
Thursday 1 July 2010.

I’ve written an article for this month’s Flash & Flex Developers’ Magazine (July 2010) which may be of interest if you are migrating from Flex 3 to Flex 4 or using a mix of MX and Spark components in Flex 4 applications.

The problem is that Flex 4 redefines the parent/child relationships of components. In Flex 3, when you put an MX component inside an MX Container, the Container was the parent of the component and the component was a child of the Container.

In Flex 4, things don’t work that way. A Spark Container may have several levels of objects intervening between it and any controls which it contains. Moreover, its contents are not (strictly speaking) its children but its elements.

To manipulate the components inside Spark containers you need to use a different set of methods than when manipulating components inside MX containers. Things get even more complicated if your applications contain a mix of both Spark and MX controls. If you use the wrong methods or try to access the incorrect parent, your program may not work as intended. This is a problem we’ve had to grapple with ourselves in order to allow the Amethyst Designer (our drag-and-drop Flex design environment) to work with both MX and Spark controls. In this article (the first of two) I explain some simple techniques that can help you to avoid some knotty problems.

Flash & Flex Developers’ Magazine is a free PDF magazine which can be downloaded here: http://ffdmag.com/magazine/1257-protecting-licensing-and-selling-adobe-flex-air-apps. If you are a serious Flash or Flex developer you should bookmark the site and download every issue as it is an invaluable source of information on a broad variety of development topics.

Bookmark and Share   Keywords:  Flex
Comments:0

Adobe Flash IDE projects in Visual Studio

by Huw Collingbourne
Design in Flash, Debug in Amethyst
Tuesday 29 June 2010.

This video explains how to share a Flash IDE (CS3/4/5) project with Amethyst so that one or more developers can use both IDEs on the same codebase...

Amethyst Professional can convert Flash IDE or Flex projects ’in place’ to share them with other IDEs (such as Flash Builder, Flash CS4 etc.). If, on the other hand, you want to import Flash Movies created in the Flash IDE for use in a separate Flash or Flex project in Amethyst, see this tutorial.

Bookmark and Share   Keywords:  Amethyst  Flash
Comments:0

Flash and Flex in Visual Studio - new video

by Huw Collingbourne
Short Intro To Amethyst
Friday 18 June 2010.

Just a brief overview of a few of the core features of Amethyst Professional...

Bookmark and Share   Keywords:  Amethyst  ide
Comments:10

Debugging ActionScript With Amethyst

by Huw Collingbourne
Screencast tutorial
Sunday 13 June 2010.

New debugging tutorial...

This covers the basics of debugging ActionScript programs (Flash/Flex/AIR) using the Amethyst ’Cylon’ debugger. We’ll post another tutorial on advanced debugging features later. For more tutorials, see the Amethyst Tutorial Index.

Bookmark and Share   Keywords:  Amethyst  tutorial
Comments:0

Flex 3 Compatibility in Flex 4 Applications

by Huw Collingbourne
The secret is the Compatibility Mode
Saturday 12 June 2010.

I’ve just been converting some old Flex 3 projects to run with the Flex 4 SDK.

Mostly this is pretty simple to do. I use the Amethyst Conversion and Importer Wizard, select ‘Convert project in original location’, and, in the configuration page, select the Flex 4 option. The Wizard creates a new project from all the original source files and it adds the appropriate Flex 4 libraries to the ‘References’ node of the Solution Explorer.

Flex 4 has its own ‘Spark’ controls which, in many cases, are alternatives to the MX controls of Flex 3 - but you are not obliged to use these. You may even continue to use an mx:Application as the main container of your user interface defined in MXML (instead of Spark’s s:Application) and the program will still compile and run.

But there are exceptions to that rule. I found that when certain MX-specific attributes are included in the MXML tags, the compiler complains. One of my converted Flex 3 applications, for example, has styles such as backgroundGradientColors and dropShadowEnabled set on the Application and components. When I tried to compile this, the following messages appeared in the Amethyst Error List and the compiler refused to build my project.

I could, of course, decide to rewrite the use interface using all Spark components. But that isn’t really necessary. The simple solution is to compile using Flex 3 Compatibility mode. To do this, go to the Project/Properties/Compiler page and check off this item...

Rebuild and run. Now, even though I’ve built using the Flex 4 SDK, my application looks and works like a Flex 3 program and my Flex 3 styles no longer cause any problem.

Bookmark and Share   Keywords:  Amethyst  Flex
Comments:0

ActionScript Refactoring

by Huw Collingbourne
Features of Amethyst Professional
Monday 7 June 2010.

Amethyst Professional provides a similar range of refactorings to those provided as standard for C#.

You can:

- Rename identifiers
- Extract a block of code into a new method
- Encapsulate a field (auto-generate getters/setters)
- Extract an interface from a class
- Promote a local variable to a parameter
- Remove parameters
- Reorder parameters
- Move a class into a new package

Refactoring takes care of rewriting code that calls the refactored elements - so, for example, if you move a class to a new package, the required directories on disk be automatically created and code that refers to the class will be rewritten to refer to the new package.

I’ve just uploaded a video to show the main refactoring options. View it below or (in higher definition) view it on YouTube.

We now have a number of video tutorials to Amethyst, ActionScript and Ruby. For the full list, go to The SapphireSteel Software Video Tutorial Index.

Bookmark and Share   Keywords:  ActionScript  Amethyst  tutorial
Comments:0

Amethyst Personal and Professional Features

by Huw Collingbourne
Feature List Now Online
Friday 4 June 2010.

We’ve just updated the Amethyst Feature List to show a comparative table of features in both the Professional and the Personal editions of Amethyst.

The Personal Edition will be released as a free product. It will have the essential editing, project management and debugging features including extensive code coloring, IntelliSense, breakpoints and drill-down debugging.

The Professional Edition will also have code refactoring, customizable code formatting, a drag and drop visual Designer for Flex, the ability to share code with the Flash IDE for editing and debugging, enhanced IntelliSense and the full features of the Amethyst ‘Cylon’ debugger including conditional breakpoints, break-on-hitcount and the ability to debug multiple SWFs simultaneously.

For more detailed information see the Amethyst feature List.

Bookmark and Share   Keywords:  Amethyst  news
Comments:0

Amethyst in Flash & Flex Developer’s Magazine

by Huw Collingbourne
Free PDF magazine
Tuesday 1 June 2010.

If you are interested in Flash, Flex or ActionScript development, you really should read the Flash & Flex Developer’s (FFD) Magazine. This is a professional-quality monthly which is available as a free PDF download.

This month’s issue (June 2010) includes articles on Flash Player 10.1 for Android, using the Zend framework with Flash Builder plus a range of technical articles and product reviews. Oh, and there is also an article by me giving the lowdown on Amethyst, our Flash Platform IDE.

Download a copy from: http://ffdmag.com

Bookmark and Share   Keywords:  news
Comments:0

More Blog Posts...

... | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 |...

 

© SapphireSteel Software 2014