AHK V2, Object(obj): is doc correct?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
SAbboushi
Posts: 252
Joined: 08 Dec 2014, 22:13

AHK V2, Object(obj): is doc correct?

14 Jul 2018, 16:21

In v2 changes doc:
Object(obj) no longer calls AddRef and returns the object's address.
I'm getting error:
Error: Parameter #1 invalid.

Line#
001: obj := {}
---> 002: Address := Object(obj)
003: Exit
004: Exit
004: Exit

The current thread will exit.

Code: Select all

obj:={}
Address := Object(obj)
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: AHK V2, Object(obj): is doc correct?

14 Jul 2018, 19:11

Is what doc correct?

You seem to expect Object(obj) to return an address, but the document you quoted is telling you it does not do that anymore.

If there is any reference to Object(obj) in the actual v2 documentation, it is an error left over from v1.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AHK V2, Object(obj): is doc correct?

15 Jul 2018, 04:00

As a non english native I did not understand that correctly - it was not apperent that the second sentence is also negated.
Recommends AHK Studio
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: AHK V2, Object(obj): is doc correct?

15 Jul 2018, 06:52

nnnik wrote:As a non english native I did not understand that correctly - it was not apperent that the second sentence is also negated.
for english natives too

SAbboushi
Posts: 252
Joined: 08 Dec 2014, 22:13

Re: AHK V2, Object(obj): is doc correct?

15 Jul 2018, 08:27

He He! Yes - that's why I posted. I misunderstood too (English is my native language too)
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: AHK V2, Object(obj): is doc correct?

17 Jul 2018, 02:01

I assumed so when I replied, but didn't care to mention it.

v1: Object(obj) [calls AddRef and returns the object's address].
v2: Object(obj) no longer [calls AddRef and returns the object's address].

I'm sure someone can fix it.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: fertalizer and 19 guests