Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (142 - 144 of 3866)

Ticket Resolution Summary Owner Reporter
#1307 Rejected Better and consistent naming of boolean parameters in UDF functions Gary Bowmore
Description

I would like to request that a bit more consistent logic is used in the naming of boolean parameters in UDF function. Particularly optional ones. This request was prompted by when I needed to use _StringBetween in case sensitive mode. From the help file it was not obvious what value I should use for the $v_Case parameter. Looking at string.au3 I found that I could use anything except the keyword Default or -1.

I think it might be more intuitive to most people if such optional boolean parameters used True / False values in the help file and were named to express the positive vale of the default option.

Examples of suggested changes:

_StringBetween($s_String, $s_Start, $s_End [, $v_Case = -1])
To
_StringBetween($s_String, $s_Start, $s_End [, $fCaseInsensitive = True])
; the default for most string functions is case insensitive
ArraySort(ByRef $avArray[, $iDescending = 0 [, $iStart = 0 [, $iEnd = 0 [, $iSubItem = 0]]]])
To
_ArraySort(ByRef $avArray[, $fSortAssending = True [, $iStart = 0 [, $iEnd = 0 [, $iSubItem = 0]]]])
;the default for most sorting functions is ascending
_DateToMonth($iMonth [, $ishort = 0])
To
_DateToMonth($iMonth [, $fLongName = True])

_ArrayTrim(ByRef $avArray, $iTrimNum[, $iDirection = 0[, $iStart = 0[, $iEnd = 0]]])
To
_ArrayTrim(ByRef $avArray, $iTrimNum[, $fTrimRight = True[, $iStart = 0[, $iEnd = 0]]])

I think this can be done with only minor changes to the relevant functions and would not break any existing scripts. It would also make it easier to choose the correct value for the displayed call tips in SciTe.

#1318 Duplicate UDFs char/wchar --> bad numbers of bytes for _MemRead()/_MemWrite() Gary Zedna
Description

According to Ticket #1317 there is similar ANSI/Unicode problem also with _MemRead()/_MemWrite()where is read/written incorrect (only half of bytes in some cases) number of bytes. In unicode version should be $iBuffer = 2 * $iBuffer --> in _GUICtrlListView_FindItem()

Such problem with bad number of bytes for _MemRead/MemWrite is in these functions (in some cases there are also hardcoded 4096 instead of 2*4096 or better dynamically computed sizes):

_GUICtrlListView_FindItem _GUICtrlListView_GetEmptyText _GUICtrlListView_GetItemText _GUICtrlStatusBar_GetTipText _GUICtrlTab_SetItem _GUIToolTip_GetTitleBitMap _GUIToolTip_GetTitleText _GUICtrlTreeView_GetText

As example of good version of this you can look at _GUICtrlListView_SetBkImage() or _GUICtrlStatusBar_SetText() or other UDFs where all sizes are handled correctly.

#1326 No Bug _GuiCtrlListView_DeleteItem does not handle control ID correctly Gary martin
Description

_GuiCtrlListView_DeleteItem works if the listview handle is passed but not if the control ID is passed. The existing function is

; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlListView_DeleteItem
; Description ...: Removes an item from a list-view control
; Syntax.........: _GUICtrlListView_DeleteItem($hWnd, $iIndex)
; Parameters ....: $hWnd        - Control ID/Handle to the control
;                  $iIndex      - Zero based index of the list-view item to delete
; Return values .: Success      - True
;                  Failure      - False
; Author ........: Gary Frost (gafrost)
; Modified.......:
; Remarks .......:
; Related .......: _GUICtrlListView_DeleteAllItems, _GUICtrlListView_DeleteItemsSelected
; Link ..........:
; Example .......: Yes
; ===============================================================================================================================
Func _GUICtrlListView_DeleteItem($hWnd, $iIndex)
	If $Debug_LV Then __UDF_ValidateClassName($hWnd, $__LISTVIEWCONSTANT_ClassName)

	If IsHWnd($hWnd) Then
		Return _SendMessage($hWnd, $LVM_DELETEITEM, $iIndex) <> 0
	Else
		Local $ctrlID = _GUICtrlListView_GetItemParam($hWnd, $iIndex)
		If $ctrlID Then Return GUICtrlDelete($ctrlID) <> 0
	EndIf
	Return False
EndFunc   ;==>_GUICtrlListView_DeleteItem

This could be

Func _GUICtrlListView_DeleteItem($hWnd, $iIndex)
	If $Debug_LV Then __UDF_ValidateClassName($hWnd, $__LISTVIEWCONSTANT_ClassName)

	If IsHWnd($hWnd) Then
		Return _SendMessage($hWnd, $LVM_DELETEITEM, $iIndex) <> 0
	Else
	 Return GuiCtrlSendMsg($hWnd, $LVM_DELETEITEM, $iIndex,0)  <> 0
	EndIf
EndFunc   ;==>_GUICtrlListView_DeleteItem
Note: See TracQuery for help on using queries.