Posts Tagged ‘Flex’

6
Apr

Using Resource Bundles in MXML for simple strings

There are a few ways developers can use resource bundles in a flex application. When using a resource bundle, in particular a simple string, inside of an mxml file you can gain access to the resource using the resourceManager or by using the @Resource directive. For simple strings, meaning strings you are not going to tokenize you should be using the @Resource directive instead of the resourceManager.
[Read more →]

6
Apr

Skinning Checkbox with Error State

Similar to skinning a combobox with an error state, there may be times where you need to show the error state for a checkbox without showing its error string.

[Read more →]

6
Apr

Skinning ComboBox with Error State

Since the ComboBox doesn’t come with an out-of-the-box error state / skin without using an error string, you can grab the sample code below to give your comboBox an error skin. The example implements the interface IValidatable which for the most part is a stub interface that should be considered itterable by the application so you can easily request that any IValidatable component shows its error state ( showError() ). The point of doing this instead of using set errorString is that in certain instances you may not actually want to use an error string, or in the case of a comboBox you may want to have its parent container show the error string.

Another case to use this method of validation would be if you have a parent container with multiple controls inside of it, the parent container is responsible for messaging the error to the user but each control should display an errored state regardless of displaying an error string.

[Read more →]

10
Jan

Compile ASDocs with ANT

Continuing on with ANT – Flex compilation, this sample script below will help you output ASDocs for your projects deliverable.

[Read more →]

17
Nov

Overriding Menu to include stage height bounds

I was working on a custom menu component uses Menu. Turns out that Menu doesnt inherintly understand the stage height of the application. What I ended up doing was creating CustomMenu which extends Menu and adds in height bounds for the root and any sub menu.

[Read more →]

2
Nov

Compile Flex applications using ANT

A quick setup and example of how to compile a Flex application using ANT. This example will show the basics of how to run the ANT script to compile your flex application, I will walk through more complex examples in later posts but to get started look through the script and properties files below or download the attached project files at the bottom of this post.

ANT is a very powerful tool that, once you get into using it, will make your development, deployment and automation a lot simpler as well a lot less prone to error. If you are new to ANT there are a lot of resources out on the web that will help you get up to speed. This post and others to follow will focus specifically on the uses of ANT with Flex in a CI build process.

[Read more →]

20
Oct

Using tokens in resource bundles

A quick sample on how to pass in token values to a resource bundle string. When you need to replace a token value in your bundle, you will want to use the resourceManager or ResourceManager and pass in the value you want to replace in your bundle as an array, this is in the 3 parameter of the resourceManager’s getString() method.

[Read more →]

5
Sep

Flex Keycodes

This is more a post-to-self regarding Key Code values in Flex.
[Read more →]

5
Sep

Flex Google Style Inline Auto Suggest Search Field

A quick little POC for building a drop down inline auto suggest, google style search field. The search is hitting a MySQL database populated with over 30,000 records, mind you some / a lot of them are duplicates and laziness forces me not to clean the data for this POC but it still proves the point. [Read more →]

21
Aug

Passing arguments to javascript’s setTimeout() method using closures

Yesterday I ended up having to hack around FCKEditor a bit to “fine tune” it for a project im involved in. The problem was that the html text we needed from the editor was getting back to our app, I didnt touch the code at all except to add a console log (window.console.log()) and tada… it works now. Well it was aparent that the fckeditor was not getting to where i needed to get to fast enough.
[Read more →]

31
Jul

Hello MXNA

Long time listener, first time caller here, I’ve been aggregated by Adobe Feeds, and im looking forward to posting a lot more relevant information related to AIR, FLEX, RIA development through my experiences and research.

12
Jul

Handling Keyboard Events

Im working on a project that required a Keyboard Manager to track shortcut keys within the Flex app, so i went ahead a wrote this quick little POC that I later incorporated into the project. I handle shortcut keys by adding and removing key listeners and mapping them to a dictionary of available keys. My final implementation handled [cmd + shift + key] for windows and [alt + key] for mac switched based on Capabilities.os. [Read more →]

5
Jul

Installing CruiseControl on CentOS with Plesk

I recently setup CruiseControl on my server and figured it might be helpful to some to put together a little walk through. My server runs CentOS and Plesk which adds a bit of difficulty above the standard rehl *nix configurations. By the end of this walk through you should be able to browse to your CC on your server.
[Read more →]

3
Jul

Flex Debugger Crashes Safari

So I had one of those awful days at work yesterday, we have all been through it at one point or another, where basically for no reason at all, everything started breaking and nothing would work. All I wanted to do was walk through my application in the debugger, and what should have been a straight shot ended up turning into hours of troubleshooting my computer. The problem was when I would try to debug my flex app, safari would crash or hang or timeout.

[Read more →]

30
Jun

Flex 3 Profiler & [tincan]

While profiling an application I’m working on I came across and interesting method in my performance snapshot. Method [tincan], for those of you wondering what this is, as I was, I Googled Flex 3 [tincan] and came across this post on flexcoders: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg83781.html
[Read more →]

18
Jun

Flex Application Life Cycle

In the last project I was working on we were developing more so based on Flex’s Application and component life cycles. Binding data within the life cycle helps eliminate the need for weak references as well as direct mxml bindings which ill admit I have been know to over use.

Recently a co-worker David Chang and I looked into the exact process Flex takes when initializing an application and its components and at what stages the data is available.
[Read more →]

16
May

Flex Call Stack and callLater()

Ive used callLater() quite a few times before, but about a week ago a co-worker asked me if I knew exactly when callLater() was called. Well I think its 1 millisecond after the method executes, to which he re-asked if its after the method or after the block of code executes? Great question, and I honestly couldn’t with absolute certainty answer him so I went ahead and wrote this quick POC to prove the fact one way or another.
[Read more →]

9
May

Image Load I/O Error in Flex

On a project im working on I ran into a very strange error when trying to load in a simple .jpg image. The image wouldn’t load. Now this sounds like a very familiar issue and easily solvable right? That what I thought too, but as it turns out, it turned into a couple hours of work and debugging. The issue wasn’t as simple as an incorrect url, network timeouts, dead links, etc… Debugging the complete() event shows the image was getting to where it had to get to and that flex felt that it did everything it had to do. So what was the problem with loading the image? [Read more →]

29
Mar

Enum toArray()

There have been plenty of times that Ive needed to reuse the values of my enums as an array. A good example of this would be an enumeration of US states. There are many ways of doing this, however I find that writing an enumeration of static constants gives me the most flexibility and accuracy in my code.

[Read more →]

29
Mar

Externalizing CSS Text for Designer

Heres a quick and easy way to separate font styles from component styles which will allow ux teams to skin fonts independent of the development team or even independent of the encapsulating component itself. This all came up from a project im involved with right now requires a high regard to pixel perfect design, which meant a lot of back and forth between the ux team. Font rendering was clearly something that needed some direct tweaking from the ux guys. while I do think i have a pretty good eye for design, they are ultimately the ones who will sign off of subpixel font grid type fitting and so on. So now my goal was to separate as much of the text formatting from the components and hopefully normalize it as best as possible as well.

[Read more →]

Next Page »