I have a Command Class:
public class GetHelpTextCommand implements Command, IResponder {
    //
    public var sectionID:String = "AccountManagementSection";
    public var helpID:String = "H001";
    //
    public function execute (evt:CairngormEvent):void {
        trace ("command executing: " + evt.type, evt.data.helpID, evt.data.section);
        var delegate:ClientDelegate = new ClientDelegate (this, MainController.EVENT_GET_HELP_TEXT);
        helpID = evt.data.helpID;
        sectionID = evt.data.section;
        trace ("checking: " + this.sectionID, this.helpID);
    }
    //
    public function result (data:Object):void {
        trace ("command result: " + data.type);
        var xml:XML = data.result;
       //here lies the problem----------------------------------------//
        var sID:String = someValue;
       /*
       if sID = the class property above (sectionID) it doesnt work;
       if sID = a string declared here it works.
       if I plug a string directly into the code below it works but not if I target sectionID or any class property
       */
       trace ("XML: " + xml.section.(@name == sID));      
       //------------------------------------------------------------------//
        trace ("result: " + data.data.helpID, data.data.section);
    }
    //
    public function fault (info:Object):void {
        trace ("command fault: " + info.type);
    }
}


So does the use of xml.section.(@name == someValue) utilize some different syntax that I am not aware of?  How can I just plug a property in there and have it work as any other code would normally?

Thanks,
Justin Opitz
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to