Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (64 - 66 of 3866)

Ticket Resolution Summary Owner Reporter
#65 Wont Fix Au3Check gives wrong error with Const ByRef params Valik Valik
Description

The following code:

CallNonConst()
CallConst()

Func CallNonConst()
	Local $a = 32
	TakesConstByRef($a)
EndFunc

Func CallConst()
	Local Const $a = 32
	TakesConstByRef($a)
EndFunc


Func TakesConstByRef(Const ByRef $c)
	ConsoleWrite($c & @CRLF)
EndFunc

produces this error:

New AutoIt v3 Script.au3(15,37) : ERROR: TakesConstByRef() previously called with expression on Const ByRef param(s).
Func TakesConstByRef(Const ByRef $c)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
New AutoIt v3 Script.au3(6,20) : REF: first call to TakesConstByRef().
	TakesConstByRef($a)
	~~~~~~~~~~~~~~~~~~^
New AutoIt v3 Script.au3 - 1 error(s), 0 warning(s)

The error is wrong. The code is perfectly valid. The problem is using a non-const and a const in the same script with the same function. It seems Au3Check is trying to infer something incorrectly. If you modify both examples to be identical (Either add Const to the Local it's missing from or remove it from the one where it's present) then there is no error. All Au3Check needs to worry about is making sure a variable is being passed to the ByRef statement, it doesn't need to concern itself if the variable is Const or not.

#66 Fixed BS_DEFPUSHBUTTON getting lost Valik Larry
Description

If I tab around or click somewhere and tab I lose the $BS_DEFPUSHBUTTON ability of my button.

When the dialog comes up press [Enter] and it works... tab around and press [Enter] and it works no more.

_Singleton("mdioahffifmffkjkfs")

#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>

Opt("RunErrorsFatal",0)

Global $sRoot="\\not important\projects\s\stuff\Dev"

$gui = GUICreate("Package File Structure",400,230,-1,-1,BitOR($WS_CAPTION,$WS_SYSMENU));,$WS_EX_TOPMOST)
GUICtrlCreateLabel("Root Dir:",10,12,80,18,$SS_RIGHT)
GUICtrlCreateLabel("Vendor:",10,37,80,18,$SS_RIGHT)
GUICtrlCreateLabel("Application:",10,62,80,18,$SS_RIGHT)
GUICtrlCreateLabel("App Version:",10,87,80,18,$SS_RIGHT)
GUICtrlCreateLabel("Customer:",10,112,80,18,$SS_RIGHT)
GUICtrlCreateLabel("OS:",10,137,80,18,$SS_RIGHT)
GUICtrlCreateLabel("App Language:",10,162,80,18,$SS_RIGHT)

$root = GUICtrlCreateInput($sRoot,95,8,210,22)
$browse = GUICtrlCreateButton("&Browse...",310,8,80,22)

$vendor = GUICtrlCreateInput("",95,33,295,22)
$app = GUICtrlCreateInput("",95,58,295,22)
$appver = GUICtrlCreateInput("",95,83,295,22)
$customer = GUICtrlCreateInput("",95,108,295,22)
$os = GUICtrlCreateInput("",95,133,295,22)
$applang = GUICtrlCreateInput("",95,158,295,22)

$create = GUICtrlCreateButton("C&reate",205,188,185,30,$BS_DEFPUSHBUTTON)
$cancel = GUICtrlCreateButton("&Cancel",10,188,185,30)

GUISetState()

While 1
	$msg = GUIGetMsg()
	Switch $msg
		Case -3,$cancel
			Exit
		Case $create
			MsgBox(4096,"","DEFPUSHBUTTON WORKED")
	EndSwitch
WEnd

Func _Singleton($sOccurenceName, $iFlag = 0)
	Local $ERROR_ALREADY_EXISTS = 183, $handle, $lastError
	
	$sOccurenceName = StringReplace($sOccurenceName, "\", "")
	$handle = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", $sOccurenceName)
	$lastError = DllCall("kernel32.dll", "int", "GetLastError")
	If $lastError[0] = $ERROR_ALREADY_EXISTS Then
		If $iFlag = 0 Then
			Exit -1
		Else
			Return SetError($lastError[0], $lastError[0], 0)
		EndIf
	EndIf
	Return $handle[0]
EndFunc
#67 Fixed GUICtrlSetGraphic in help file Jpm anonymous
Description

GUICtrlSetGraphic example in the help file shows a misspelled word :

GUICtrlSetColor(-1, 0) ; to display a balck border line

Note: See TracQuery for help on using queries.