I've just updated to a100 from a095, and as is to be expected, a number of things broke in my scripts. Replacing <> with != was easy enough, but there is one thing that's been puzzling me. It used to be that properties could be called as either:
obj.property[p1, p2] -OR- obj.property(p1, p2) (using brackets or parentheses)
I have a number of references like this one:
itr(qty).str(dlm, x=>this) --- where itr is a top-level function, and str is a property of the class returned by itr -- in this case, with 100% optional parameters. When I change the code to itr(qty).str[dlm, x=>this] it works fine. Are parentheses no longer allowed for property calls?
I was looking through the commits trying to find if this change was intentional, but might have missed it. Can anyone help me understand the change and whether that's the entirety of the impact of that particular change?
[a100] Parentheses no longer allowed for property calls? Topic is solved
Re: [a100] Parentheses no longer allowed for property calls?
Thanks Helgef. I'm sure you all get this a lot, and I know you can change alpha features at any time. Was it causing problems for some new functionality? I had previously thought Lexikos was OK continuing to allow the parens calls...
I was one of those you converted long ago, and I use properties for a lot of parameters-completely-optional methods so I don't have to have empty parentheses all over. Seeing them with brackets doesn't work as well. Any chance of reconsidering this one?
Re: [a100] Parentheses no longer allowed for property calls? Topic is solved
There is almost no chance of this being reverted; definitely no chance if properties and methods are separated. See Objects.
You can override the behaviour with meta-functions, although it requires structuring your object differently.
You can override the behaviour with meta-functions, although it requires structuring your object differently.
Return to “AutoHotkey Development”
Who is online
Users browsing this forum: No registered users and 43 guests