I don't think you want a function with the same name as your class. The compiler thinks it is a constructor, which is *supposed* to have the same name.
Tracy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Rottman Sent: Wednesday, September 14, 2005 1:27 PM To: [email protected] Subject: [flexcoders] inserting data I am starting to build a simple app that passes data from a flex form to cf. However when I try to compile I get the following error. But I dont have any constructors in my as code. Anyone have a clue what I did wrong. I have attached my code. 1 Error found. Error /qiSaleAdmin.as:1 A class must have only one constructor. AS-- function qiSaleAdmin(fileNum, mlsNum, propStreet, propNum, propDir,propCity, propState, propZip, buyerName, sellerName, propCoe, propPrice, agentId, agentId2) { srv.qiSaleAdmin(fileNum, mlsNum, propStreet, propNum, propDir,propCity, propState, propZip, buyerName, sellerName, propCoe, propPrice, agentId, agentId2);} Flex-- <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="srv.qpUsers.send()"> <mx:WebService id="srv" wsdl="http://70.97.113.6/test/smartPanel.cfc?wsdl"> </mx:WebService> <mx:Script source="qiSaleAdmin.as" /> <mx:Script> var states = [ {label:"Arizona", data:AZ}, {label:"California", data:CA} ]; var selectedItem:Object; </mx:Script> <mx:Form width="763" x="0" y="0"> <mx:HBox width="645"> <mx:FormItem label="File Number" required="true"> <mx:TextInput id="fileNum" /> </mx:FormItem><mx:FormItem label="MLS Number" required="false"> <mx:TextInput id="mlsNum" /> </mx:FormItem> </mx:HBox> <mx:HBox width="645"> <mx:FormItem label="Address" required="true"> <mx:TextInput id="propNum" text="" /> </mx:FormItem> <mx:FormItem label="" required="false" width="99"> <mx:TextInput id="propDir" maxChars="2" width="71" text="" /> </mx:FormItem> <mx:FormItem label="" required="true"> <mx:TextInput id="propStreet" text="" /> </mx:FormItem> </mx:HBox> <mx:HBox width="645"> <mx:FormItem label="City" required="true"> <mx:TextInput id="propCity" text="" /> </mx:FormItem> <mx:FormItem label="State" required="false"> <mx:ComboBox id="propState" dataProvider="{cards}" width="150" /> </mx:FormItem> <mx:FormItem label="Zip" required="false"> <mx:TextInput id="propZip" width="143" text="" maxChars="9" /> </mx:FormItem> </mx:HBox> <mx:HBox width="645"> <mx:FormItem label="Buyer Name" required="false"> <mx:TextInput id="buyerName" text="" /> </mx:FormItem><mx:FormItem label="Seller Name" required="false"> <mx:TextInput id="sellerName" text="" /> </mx:FormItem> </mx:HBox> <mx:HBox width="645"> <mx:FormItem label="COE Date" required="false"> <mx:DateField id="propCoe" /> </mx:FormItem><mx:FormItem label="Sale Price" required="false"> <mx:TextInput id="propPrice" text="" /> </mx:FormItem> </mx:HBox> <mx:HBox width="645"> <mx:FormItem label="Agent 1" required="false"> <mx:ComboBox id="agentId" dataProvider="{srv.qpUsers.result}" width="150" /> </mx:FormItem><mx:FormItem label="Agent 2" required="false"> <mx:ComboBox id="agentId2" dataProvider="{srv.qpUsers.result}" width="150" /> </mx:FormItem> </mx:HBox> <mx:ControlBar horizontalAlign="right" width="653"> <mx:Label text="Function: qpUsers, qiSaleAdmin"/> <mx:FormItem label=""> <mx:Button label="Submit" click="qiSaleAdmin(fileNum.text, mlsNum.text, propStreet.text, propNum.text, propDir.text, propCity.text, propState.text, propZip.text, buyerName.text, sellerName.text, propCoe.text, propPrice.text, agentId.text, agentId2.text);" /> </mx:FormItem> </mx:ControlBar> </mx:Form> </mx:Application> CFC-- <cffunction name="qiSaleAdmin" access="remote" returntype="string" output="false"> <cfargument name="fileNum" type="string" required="yes" hint="File Number" /> <cfargument name="mlsNum" type="string" required="no" hint="mls number" /> <cfargument name="propStreet" type="string" required="yes" hint="property street number" /> <cfargument name="propNum" type="string" required="yes" hint="property house number" /> <cfargument name="propDir" type="string" required="no" hint="property direction" /> <cfargument name="propAPN" type="string" required="no" hint="arizona parcel number" /> <cfargument name="propCity" type="string" required="yes" hint="property city" /> <cfargument name="propState" type="string" required="yes" hint="property state" /> <cfargument name="propZip" type="string" required="yes" hint="property zip" /> <cfargument name="buyerName" type="string" required="yes" hint="buyer name" /> <cfargument name="sellerName" type="string" required="yes" hint="sellers name" /> <cfargument name="propCoe" type="string" required="yes" hint="property close of escrow" /> <cfargument name="propPrice" type="string" required="yes" hint="property price" /> <cfargument name="agentId" type="string" required="yes" hint="1st agent id" /> <cfargument name="agentId2" type="string" required="no" hint="2nd agent id" /> <cfargument name="agentId3" type="string" required="no" hint="3rd agent id" /> <cfargument name="agentId4" type="string" required="no" hint="4th agent id" /> <!-- query to insert new sale admin function, shit ton of vars passed from as. See the arguments bitch --> <cfquery name="qiSaleAdmin" datasource="#application.dsn#"> insert into tbl_smartPanel_propInfo (fld_fileNum, fld_mlsNum, fld_propStreet, fld_propNum, fld_propDir, fld_propARN, fld_propCity, fld_propState, fld_propZip, fld_buyerName, fld_sellerName, fld_propCoe, fld_propPrice, fld_agentId, fld_agentId2, fld_agentId3, fld_agentId4) values ('#argument.fileNum#','#argument.mlsNum#','#argument.propStreet#','#argu ment.propNum#','#argument.propDir#','#argument.propAPN#', '#argument.propCity#','#argument.propState#','#argument.propZip#','#argu ment.buyerName#','#argument.sellerName#','#argument.propCoe#', '#argument.propPrice#','#argument.agentId#','#argument.agentId2#','#argu ment.agentId3#','#argument.agentId4#') </cfquery> <cfset msg = "You have added #argument.fileNum# as a new sale"> <cfreturn msg /> </cffunction> -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/

