cairngorm

How can I unit test Flex applications from within the IDE or a build script?

I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of FlexUnit but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exist? Also, are there any other resources on how to do Flex development "the right way" beside...

Objectively, what are the pros and cons of Cairngorm over PureMVC?

There are so many reasons why using an MVC framework in Flex rocks, but picking the right one seems tricky. I am interested in what you all think from your experiences of implementing either of these (or another). Sam ...

Cairngorm Code Generator

I was wondering if there's a code generator for Cairngorm that can be installed as a plugin in Eclipse? No code generator like in WebORB, FluorineFX that inspects the DataBase and generates a whole lot of code. I just want a plugin for eclipse where I can give in some options and properties. Then the plugin generates the appropriate even...

Best place to put prototype code in Flex project

I'm making a Flex project, using the Cairngorm library, and trying to keep the code in a good MVC structure. I just added some code to add a prototype function to a built-in class (I added the method "contains" to Array), and I'm wondering what you would consider the best-practice for where to put this code in my project structure? ...

Who's Using Cairngorm 2.2 with Imported Web Services?

I'm very new to Cairngorm, so apologies for what's probably a simple question: I'm working with a number of WCF services imported into Flex Builder 3 (via Data > Manage Web Services), and I'm wondering how to expose those services to the ServiceLocator in Cairngorm. From what I've read so far, it looks like Cairngorm prefers the servic...

How do I implement data binding in an ActionScript Class?

I am having a problem with binding values in my ActionScript components. I basically want to set the value of a a variable in my component to a value in the model, and have the component variable automatically update when the model value is updated. I think that I just don't fully understand how data binding works in Flex - this is not a...

What is the best way to reuse functions in Flex MVC environment?

I am using a Cairngorm MVC architecture for my current project. I have several commands which use the same type of function that returns a value. I would like to have this function in one place, and reuse it, rather than duplicate the code in each command. What is the best way to do this? ...

Ant Flex problem

My Cairngorm program does some preliminary authentication against a RemoteObject before allowing Cairngorm's ServiceLocator to start using the same RemoteObject to get business data. Everything works fine with Flex Builder, but I need an Ant build. The Ant mxmlc task compiles everything ok, but at runtime the resulting code fails at th...

Flex and Cairngorm Error: C0001E: Only one ServiceLocator instance can be instantiated.

Hey guys, I’m new to Flex and Cairngorm.While I’m using ServiceLocator,I do run into the problem: Error: C0001E: Only one ServiceLocator instance can be instantiated. My Code is like this: In Serives.mxml: <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cairngorm="com.adobe.cairngorm.business.*"> <mx:HTTPSer...

How do I structure multiple Cairngorm MVC projects that share several components?

I recently completed a project for a custom report UI in Flex. Now, I've been tasked with creating a new application that is essentially a "lite" version of the original UI. It will include only a few of the options that are in the original application. Also, it needs to be a separate application. I do not want to duplicate my code, so ...

What is the best way to architect extended Cairngorm classes to be shared across applications?

I have created a few Event and Command classes for use in my Cairngorm projects. For example, I created an class that extends com.adobe.cairngorm.control.CairngormEvent that allows me to set callback functions upon completion or failure of the corresponding Command. To accomplish this, I also had to create a new Class that implements co...

Where should I store reused static string constants in Flex application?

I have two Cairngorm MVC Flex applications (a full version and lite version of the same app) that share many Classes. I have put these Classes into a Flex Library Project that compiles as an SWC. Both applications use some static String constants. Right now, I am storing these in the ModelLocator: package model { [Bindable] publ...

how does cairngorm+flex integrate with rails?

I mean, the mvc for cairngorm and the one in rails don't overlap their functionalities? I'm not sure I understand the need for cairngorm with the rails backend.. ...

How to force Flex validation when a container is displayed

I have a Flex 3 app with a view in a viewstack, and that view must only be created when requested. I have declared validators for each of the controls on the view and I have created a method called checkAllValid() which runs Validator.validateAll(). This works great when I'm actually using the controls (using the change or focusOut event...

pass parameters to HTTPService and use them inside the URL

Flex3 + Cairngorm. I have my service in Servicis.mxml: <mx:HTTPService id="docIndex" url="{URL_PREFIX}/jobs/{???}/docs" resultFormat="e4x"/> And I call it from my generic restful delegate like this: public function index(params:Object):void { var call:AsyncToken = services.getHTTPService(resourceName+"Index").send(params); call....

Best practices to keep a Cairngorm Flex Project DRY (don't repeat yourself)

I'm having a hard time building a Cairngorm Flex3 app that connects to a rails app... I'm used to rails DRY approad, and the Convention over Configuration thing too.. and Cairngorm in awful at these. How do you keep you flex code as DRY as possible? I've implemented a generic delegate to avoid a delegate for each command, at least. Any...

Send form data to HTTPService: how to approach it in Cairngorm?

The form is in a component lauched as a popUp, form data consists in: login:String password:String I thought of a few different ways, but I don't like them.. in the popUp, send button triggers a function that gets the form values and stores them in an Object, then saves the Object in the model, then dispatches a CreateSessionEvent. ...

Flex - Checking for change in fields under a tab

Hi, I'm developing a flex application with 4 tabs. When the user switches a tab I want to reset the previous tab to its initial state. Also I need to alert the user, if he hasn't saved the changes he made if any, will be lost. I'm planning to set a variable in the Model, and set/reset it if any change happens in a field under a tab. Bu...

Cairngorm and FABridge

I am looking for a good Cairngorm Tutorial that shows how to integrate FABridge into a Cairngorm web application. ...

make cairngorm commands ALWAYS work synchronously

I see the benefit of asynchronous commands (waiting for server responses...) but in my flex app it creates me more problem than anything. Here's what I want: EVERY command executes only after the previous one returned (to result or fault function) And I'd like to do this as easily as possible.. by the way the GUI must become irresponsi...