#790 closed Bug (Fixed)
Badly named constant in WindowsConstants.au3
| Reported by: | monoceres | Owned by: | Jpm |
|---|---|---|---|
| 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:2 by , on Jan 26, 2009 at 6:57:22 PM
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 , on Jan 27, 2009 at 9:04:49 AM
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 , on Feb 1, 2009 at 12:15:06 PM
| 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: