Default Base Object
Default Base Object
The examples in the v2 docs don't run with v2.0-a076 and v2.0-a077 (Error: This line does not contain a recognized action). Is it intended?
Re: Default Base Object
i guess the example "".base is no longer valid because of this:https://lexikos.github.io/v2/docs/Objects.htm#Default_Base_Object wrote: The default base may be accessed by using .base with any non-object value; for instance, "".base.
changing "". to dummyvar. works, but then you run into the next issue:https://autohotkey.com/v2/v2-changes.htm wrote: Variable names cannot start with a digit and cannot contain the following characters which were previously allowed: @ # $. Only letters, numbers, underscore and non-ASCII characters are allowed.
Code: Select all
empty_var.foo := "bar" ; <-------- no object to invoke
https://autohotkey.com/v2/v2-changes.htm wrote: Error Handling
Expressions
An exception is thrown when any of the following failures occur (instead of ignoring the failure):
- An invocation fails because the target is not an object, or the method/property is not handled. For associative arrays, only a method call can cause this.
Re: Default Base Object
That is expected.just me wrote:The examples in the v2 docs don't run
"" is clearly not a variable.I wrote:A great many examples have not been updated.
Topic: Documentation updated
It is not recognized as a standalone action because of a change to the way quotation marks are handled. Note that " ".base doesn't work in v1 either. The problem is only with detection of what kind of action the line contains, not parsing of the expression once it is recognized as such. The simple workaround is to use ("") or 0.
I was aware of the problem and hadn't planned to fix it, but maybe I will.
To avoid the exception, you just need to return value.
Re: Default Base Object
Thanks for the explanation.
Return to “AutoHotkey Development”
Who is online
Users browsing this forum: No registered users and 26 guests