candysmate escreveu:
> Focus can be a real pain, as we all know.  
>
> I have a function which re-focuses a datagrid so:
>
> private function staffGridFocus():void
> {
>     salesStaffGrid.setFocus();
>     salesStaffGrid.selectedIndex = gridSelectLine;
>     editStaffCell = {columnIndex:0, rowIndex: gridSelectLine};
>     salesStaffGrid.editedItemPosition = editStaffCell;
> }
>
> no arguements are expected or required.
>
> After my user saves data to MS SQL 2005, via Janus, I alert them that
> the action has been completed with:
>
> Alert.show("Staff data updated", 'Information:', 0, this,
> staffGridFocus, informationIcon);
>
> However, I get a runtime error:
>
> ArgumentError: Error #1063: Argument count mismatch on
> main/main::staffGridFocus(). Expected 0, got 1.
>
> I'm  *guessing* that the Alert windows's closeEvent is being passed as
> an arguement to the function for some reason.
>
> How can I prevent this, or have you guys any other ideas please?
>
>
>
> --
> 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
>
>
>
>
> __________ NOD32 2760 (20080102) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Try this

private function staffGridFocus(value:Object=null):void

Regards,

Frederico Garcia


Reply via email to