1 Reply Latest reply on Sep 24, 2008 12:31 AM by ziad.shady

    Accessing the id's in Cairngorm

    Nirmal Kumar Bhogadi
      I have started working in Cairngorm recently. My doubt is say if we have a mxml file which has a HBox whose id is "container". I want to access that id into my command file. Say I want to set my height .....normally i would set that as container.height...but how can I access that into my command file?
        • 1. Re: Accessing the id's in Cairngorm
          ziad.shady
          I guess that is not a best practice to use your objects representing your view in the command. According to Cairngorm philosophy, the command allow just to execute command and recover data in server side.

          But is not restricted, you have to do an import of your view like :
          import x.y.z.view.*; which x,y and z represent your packages, then you have to declare variables with same name in the view and with visibility public, in this case : public var container:HBox;
          then enjoy yourself ;)

          but It would be better to describe you situation, perhaps there is an other solution more than optimized than this.