﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3799	_ChooseFont (Canceling the dialog) suggestion.	Dan_555		"Currently, when the _ChooseFont is called, and the font dialog is cancelled, the array is not created and @error is not set for it.

Testcode fails, if the fontdialog is cancelled, at the $font=$aF[2]:


{{{
Func SelFont()						;Select a font
	Local $aF = _ChooseFont($font)
	If @error > 0 Then
		$font = ""System2""
	Else		
			$font = $aF[2]		
	EndIf

EndFunc   ;==>SelFont
}}}

My Suggestion would be to set the @error flag to a number higher than 0

There is a workaround code, to check if the array was created:


{{{
Func SelFont()						;Select a font
	Local $aF = _ChooseFont($font)
	If @error > 0 Then
		$font = ""System2""
	Else
		if IsArray($af) then
			$font = $aF[2]
		Else
			$font = ""System2""
		EndIf
	EndIf

EndFunc   ;==>SelFont
}}}
 "	Bug	closed		AutoIt	3.3.14.0	None	No Bug		
