Cairngen with Cairngorm with UM Extensions

This post is a video on Cairngorm with UM Extensions and cairngenum. It explains some of the subtle differences between cairngorm, and cairngormUM, and what the extensions allow you to do that cairngorm doesnt allow very easily. The Video is listed at the bottom of the post

This post is a video on Cairngorm with UM Extensions and cairngenum. It explains some of the subtle differences between cairngorm, and cairngormUM, and what the extensions allow you to do that cairngorm doesnt allow very easily. The Video is listed at the bottom of the post

  • Files and links:
  • Main differences:
    • the ability to add CallBacks()

  • Project
    • create a blank project
      • paste cairngenum into root project folder
      • change project.properties to match current project
      • open cairngenum/Build.xml in ant editor (should open by default in ant editor)
      • in “outline” view right click “main” > run as > ant build
      • in your console you’ll see if build is successful or if it failed, and why it failed

  • create a mock up xml file that we are going to use to hold some dummy xml to act as our information we retrieve from the service
    • create the file under your src directory “/src/assets/data/users.xml” and format it like the following:
    • <root> <users> <user name="Axel"/> <user name="Ben"/> <user name="Ryan"/> <user name="Tom"/> <user name="David"/> </users> </root>
    • we will now create the sequence that retrieves this information from the file and return it back into our code for us to manipulate.

    • create a sequence
      • a sequence is an event, command, and adding the command to the controller, and Optionally could be creating the delegate as well, in cairngenum the delegate must be created with the create-delegate target in the build.xml file.
      • with build.xml open in outline view right click “create-sequence” > run as > ant build
        • when you do this you will be prompted for an event stub name
          • type “UserRead” click OK

  • now you will be prompted for the event constant name
    • type “USER_READ_EVENT” click OK

  • now you will be prompted for the event type constant
    • type “UserReadEvent” click OK

  • now you will be prompted for the delegate name
    • type “UsersDelegate” click OK

    the message in the console should look something like this

    Buildfile: E:\fb3Workspace\TestUMCG\cairngenum\build.xml log: create-sequence: [echo] @Invoking Cairngenum on [TestUMCG] --&gt; Generating file(s): UserReadCommand.as and UserReadEvent.as, using UsersDelegate.as internal-create-custom-event-class: [copy] Copying 1 file to E:\fb3Workspace\TestUMCG\src\com\axelscript\tempCairngenUM\events create-command: [copy] Copying 1 file to E:\fb3Workspace\TestUMCG\src\com\axelscript\tempCairngenUM\commands [copy] Copying 1 file to E:\fb3Workspace\TestUMCG\test\com\axelscript\tempCairngenUM\commands internal-register-sequence: BUILD SUCCESSFUL Total time: 3 minutes 34 seconds

    Page 1 of 2 | Next page