nsresult nsCommonDialogs::Select(nsIDOMWindow *inParent, const PRUnichar *inDialogTitle, const PRUnichar* inMsg, PRUint32 inCount, const char **inList, PRInt32 *outSelection, PRBool *_retval)
nsresult nsCommonDialogs::Select(nsIDOMWindow *inParent, const PRUnichar *inDialogTitle, const PRUnichar* inMsg, PRUint32 inCount, const PRUnichar **inList, PRInt32 *outSelection, PRBool *_retval)
nsresult nsCommonDialogs::Select(nsIDOMWindow *inParent, const PRUnichar *inDialogTitle, const PRUnichar* inMsg, PRUint32 inCount, const char **inList, PRInt32 *outSelection, PRBool *_retval){		nsresult rv;	const PRInt32 eSelection = 2 ;	nsIDialogParamBlock* block = NULL;	rv = nsComponentManager::CreateInstance( kDialogParamBlockCID,                                                      0,                                                      NS_GET_IID(nsIDialogParamBlock),                                                      (void**)&block );      	if ( NS_FAILED( rv ) )		return rv;	block->SetNumberStrings( inCount + 2 );	if (inDialogTitle) {		block->SetString( 0, inDialogTitle );	}	else {                // todo, put that in a string bundle                nsString defaultTitle("Select");                block->SetString( eDialogTitle, defaultTitle.GetUnicode());	}	block->SetString(1, inMsg );	block->SetInt( eSelection, inCount );	for ( PRUint32 i = 2; i<= inCount+1; i++ )	{		nsAutoString temp(inList[i-2]  );		const PRUnichar* text = temp.GetUnicode();				block->SetString( i, text);	}	*outSelection = -1;	static NS_DEFINE_CID(	kCommonDialogsCID, NS_CommonDialog_CID );	NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &rv);	 if ( NS_SUCCEEDED( rv ) )	 { 		rv = dialog->DoDialog( inParent, block, "chrome://global/content/selectDialog.xul" );			PRInt32 buttonPressed = 0;		block->GetInt( nsICommonDialogs::eButtonPressed, &buttonPressed );		block->GetInt( eSelection, outSelection );		*_retval = buttonPressed ? PR_FALSE : PR_TRUE;		NS_IF_RELEASE( block );	}	return rv;}