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…

 

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…

 

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…

 

Shell Bash History

Every want to recall something you did / wrote in your terminal months ago. I have configured a few servers in my day and through the that time I try to be good and document my steps but every now and again I go off on a testing spree and try a few things, get something working and shift focus and forget about documenting what made it work.

I didnt realize until only recently that everything you type into you terminal window gets logged. So if you ever want to recall your previous bash scripts open your terminal and simply type

history

Which will return the log dump of your bash history, every command you have ever typed. Great if you cant remember exactly which vnc server you installed last year to get a headless server running flex unit or whatever may have slipped your mind.

 

Installing LAMP on a clean Ubuntu server

I recently just setup a clean Ubuntu server, I’m going to use this box for my dedicated CI machine and repository. To prepare this box for being a Continuous Integration machine I need to do a few things first including getting it to be accessible to the web. This post walks through getting a clean Ubuntu server setup with LAMP.

Read more…

 

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…

 

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…

 

Installing Tomcat on CentOS

Continuing in setting up my CentOS server, the next thing I need is to get Hudson setup. Before I can get Hudson up and running I’ll need to get Tomcat installed. I could of course use Winstone which will get me up and running, but I know I will need Tomcat soon for some other things as well so might as well get it setup now.

Read more…

 

Setting up a CentOS server

More recently I have been having some issues with Plesk, I’ve felt like I’ve been fighting with Plesk’s default generic templates and cookie cutter processes. What should be simple such as adding custom wars to Tomcat end up proving more times then not to be a royal pain. This passed month I ended up playing around with Hudson, a Continous Integration server, and I found myself struggling through what should have been a seamless installation. Basically it took me 10 minutes to setup, install, and configure my first build in Hudson on my Mac but to be honest I ended up giving up after 3 days of struggling to get Hudson installed on my dedicated CentOS server that ran Plesk. Dont get me wrong, there are plenty of other things that bug me about Plesk but this latest thing was what ended up pushing me to get a basic server setup from scratch and configured exactly as I wanted it.

Read more…

 

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…

 

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…

 

Flex Keycodes

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

 

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…

 

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…

 

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.

 

lejnieks.com WordPress Skin… a work in progress

Ive been looking around for a new theme for my blog for a while now, ive looked at all the posted themes on too many sites and although many of them do look amazing and really come close to what im looking for, none of them hit the mark exactly. So with that said, for those of reading this, all 2 of you :) the sites theme is a work in progress and will be getting regular update, time permitting of course.

 

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…

 

Some Handy CruiseControl Commands

Now that I have CruiseControl configured and running on my server I need a way to be able to stop/kill the processes, so I did some research and found this.
Read more…

 

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…

 

Installing Subversion on CentOS with Plesk

Just a quick walk through on installing subversion on a CentOS server running Plesk. What your going to want to grab is a fresh copy of YUM to handle the installation of subversion. YUM ( Yellow dog Updater, Modified) is “… an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm…”

Read more…