Opened 17 years ago
Closed 17 years ago
#790 closed Bug (Fixed)
Badly named constant in WindowsConstants.au3
| Reported by: | monoceres | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.1.0 | Component: | AutoIt |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | constants $error | Cc: |
Description
Not really a "bug" but I don't think that declaring $ERROR as const in WindowsConstants.au3 is a very good idea, since you then cannot use variables named $error, which is a very common name to name variables.
Just my 2 cents, it sure did cause me some headaches.
Attachments (0)
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Off the top of my head I'm not sure what $ERROR would be used for. However, the constants $TRANSPARENT and $OPAQUE really are the names of Windows API constants so I don't think we should change them.
comment:3 by , 17 years ago
In fact this naming come from MSDN.
MS could have named it as the others ERRORREGION.
Perhaps we can change it as it use only when using _WinAPI_CombineRgn() or _WinAPI_GetWindowRgn()
The "problem" is the same for TRANSPARENT and OPAQUE in _WinAPI_Get/SetBkMode()
PS your headaches could have been little less when using Opt("MustDeclareVars",1)
comment:4 by , 17 years ago
| Milestone: | → 3.3.1.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed in version: 3.3.1.0

Replying to monoceres:
I also found this, not very good constant names either: