‘Hello World’ using Cairngorm Extensions

Here is a simple “Hello World” type of application using Cairngorm Extensions from Universal Mind.

This application demonstrates the following two features of the Cairngorm Extensions:

  • Aggregation of event-business logic within a single Command class
  • Support for optional view notifications

A detailed list of features in Cairngorm Extensions is available on the Google Code site for Cairngorm Extensions.

This Flex application simply displays a text area box for where a user can input her/his name, and then click on one of the two buttons. Depending on the button clicked, the application displays greeting with the name of the user.

Hello World with Cairngorm

View the application

Download the source


4 thoughts on “‘Hello World’ using Cairngorm Extensions”

  1. The UMEvent is not Used Properly it has more parameters that you can use, so you dont have to use Getters and Setters or public varaibles. like the public var name: String = “”;

    Example:

    public function GreetingsEvent(eventType:String, handlers:IResponder=null, bubbles:Boolean=true, cancelable:Boolean=false, data:Object=null)
    {
    super(eventType, handlers, bubbles, cancelable, data);
    }

    the data : Object parameter let us cast it in the command class in this case in the GreetingsCommand.

    You can call casting event.data in the command to a VO ( value object ) or a simple string like event.data.name in this case.

    Rene Roberto Ramirez Szabo
    Caracas – Venezuela

  2. Hey im trying to include this responder into a project and have updated my command from

    public class commandA implements ICommand, Responder
    {

    to

    public class commandA extends Command

    but now when i try to create the delegate

    var delegate:MyDelegate = new MyDelegate ( this );
    delegate.remoteFunc( event.commandArgs );

    i get

    Implicit coercion of a value of type com.ordering.control.commands:AddItemToPadCommand to an unrelated type com.adobe.cairngorm.business:Responder. AddItemToPadCommand.as

    Can u provide an example of the above where it calls the a delegate in the command

    thanks

Leave a Reply

Your email address will not be published. Required fields are marked *