Custom Query
Results (184 - 186 of 3866)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#3753 | Completed | _GUICtrlListView_SetImageList does not check for errors | Melba23 | MrCreatoR |
Description |
Example: #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> Example() Func Example() Local $hImage, $idListview GUICreate("ListView Set Image List", 400, 300) $idListview = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState(@SW_SHOW) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, -1) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example If third parameter ($iType) passed as not supported type (< 0 Or > 2) the script crashes. GuiListView.au3 (3809) : ==> Variable subscript badly formatted.: Return Ptr(GUICtrlSendMsg($hWnd, $LVM_SETIMAGELIST, $aType[$iType], $hHandle)) Return Ptr(GUICtrlSendMsg($hWnd, $LVM_SETIMAGELIST, $aType[^ ERROR I know it's wrong usage, but still should be some error checking in _GUICtrlListView_SetImageList function: Func _GUICtrlListView_SetImageList($hWnd, $hHandle, $iType = 0) $iType = Int($iType) ;In case the $iType passed as other var type than int If $iType < 0 Or $iType > 2 Then Return SetError(1, 0, 0) ;Or ommit the Return and set: $iType = 0 EndIf Local $aType[3] = [$LVSIL_NORMAL, $LVSIL_SMALL, $LVSIL_STATE] If IsHWnd($hWnd) Then Return _SendMessage($hWnd, $LVM_SETIMAGELIST, $aType[$iType], $hHandle, 0, "wparam", "handle", "handle") Else Return Ptr(GUICtrlSendMsg($hWnd, $LVM_SETIMAGELIST, $aType[$iType], $hHandle)) EndIf EndFunc |
|||
#3752 | Rejected | Making mod() an infix operator | Robinson1 <Djamana@…> | |
Description |
That ticket is about the AutoIT Language parser. In short:Concerning:
What if: $result = 3 mod 2 works as well as $result = Mod(3,2) currently does. In more detailthe idea of this ticket is to propose to also have for function/operators BitAND, BitOR, BitXOR, BitXOR, BitShift, BitRotate and Mod also an infix version? ... like it is in most other common programming languages it is. For example JavaScript: Result = Value & Mask And vs BitAnd()Concerning this the situation in AutoIT is at the moment a little 'unique'. While the logical And is indeed infix: $bIsEnable = $bIsGUI_chkEnabled and $bIsGUI_chkChecked for the Bitwise pendant BitAnd it is not: $Result = BitAND ( $Value , $Mask ) (Instead it's a prefix operator - like most the other functions) So I wonder why it is like this. Question 1:
Okay Autoit is a matured Language but yeah it's never to late for a change. Question 2: Wasn't there any tries to unify that before? So what about also making the 'Bit' operations infix as well. ... while of course keeping the 'old' prefix version -for backwards compatibility - . It won't break anything, but in my eyes is a big improvement regarding style and intuitivity of Autoit. Linked Forum Topichttps://autoitscript.com/forum/topic/202303-autoit-language-why-bitand-is-not-an-infix-statemen |
|||
#3751 | Fixed | Abbreviation Manager with abbreviation [ | Melba23 | Nine |
Description |
Creating an abbreviation with character [ generates all sort of problems. Unable to delete, to rename, to edit. Only way to get rid of it is to go directly into the au3UserAbbrev.properties file and delete the line. |