I have a pop up that I am using for a user lookup. When they search
for a user it is display in a data grid. And when they click on the
name it is suposed to bind over to the text input on the main stage.
However, I think something went arey and I cant get it to compile. So
can someone give me a bit of help. The error I get is this.

Type annotation is not a compile-time constant: a1BindEvent
adminAddList.as 

Pop up window:

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.macromedia.com/2005/mxml";
resizeEffect="Resize" xmlns="*" width="25%" height="25%" title="Agent
Lookup">
<mx:WebService id="srv" useProxy="false"
wsdl="http://*********/cfc/adminHS2F.cfc?wsdl"; showBusyCursor="true" />
<mx:Script source="as/adminAddList.as" />

    <mx:Script>

        private function a1Bind():Void
        {
            dispatchEvent(new a1BindEvent(a1DG.FLD_USERLOGIN));
            mx.managers.PopUpManager.removePopUp(this);
        }

    </mx:Script>

    <mx:Metadata>
        [Event("a1Bind")]
    </mx:Metadata>
    <mx:states>
        <mx:State name="results">
            <mx:PropertyOverride property="width" value="45%"/>
            <mx:PropertyOverride property="height" value="45%"/>
            <mx:AddChild target="{canvas1}" position="lastChild">
                <mx:DataGrid id="a1DG" click=""
dataProvider="{srv.qpAgentDisplay.result}">
                    <mx:layoutConstraints>
                        <mx:EdgeAnchor top="55" left="6" bottom="6"
right="49"/>
                    </mx:layoutConstraints>
                    <mx:columns>
                        <mx:DataGridColumn headerText="Agent ID"
columnName="FLD_USERLOGIN"/>
                        <mx:DataGridColumn headerText="First Name"
columnName="FLD_FIRSTNAME"/>
                        <mx:DataGridColumn headerText="Last Name"
columnName="FLD_LASTNAME"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:AddChild>
        </mx:State>
    </mx:states>
    <mx:Canvas width="100%" height="100%" id="canvas1">
        <mx:Label text="Agent Name:" x="7" y="1"/>
        <mx:TextInput x="7" y="22" id="search"/>
        <mx:Button x="174" y="22"
click="currentState='results';qpAgentDisplay(search.text)"
label="Search"/>
    </mx:Canvas>

</mx:Panel>


AS CODE:

// Agent Lookup 1

            import mx.managers.PopUpManager;

        private function showWindow1(modal:Boolean):Void
        {
            var agent1Window:Agent1Window = new Agent1Window();
             agent1Window.addEventListener("a1Bind", a1BindHandler);
             var popup:Object = PopUpManager.popUpWindow(agent1Window,
this, modal);
                PopUpManager.centerPopUp(popup);
        }
        // Agent Lookup 1 Binding   
        public function a1BindHandler(event:a1BindEvent):Void
        {
            fld_agentId.text=a1BindEvent.a1DG.FLD_USERLOGIN
        }







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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to