Hotkey not working if first Line defines a Class

Report problems with documented functionality
alllala
Posts: 17
Joined: 03 Apr 2014, 05:04

Hotkey not working if first Line defines a Class

04 Nov 2014, 11:09

Code: Select all

^!6::
;Some command must be here or the class/hotkey does not work
class baseObject {
    static foo := "bar"
}
obj1 := Object(), obj1.base := baseObject
obj2 := {base: baseObject}
obj3 := new baseObject

MsgBox % obj1.foo " " obj2.foo " " obj3.foo
Using AHK 1.16.05 and I´m not sure if this is a bug or a feature I don´t get.
Last edited by alllala on 05 Nov 2014, 09:53, edited 1 time in total.
Xerxes77
Posts: 23
Joined: 20 Sep 2014, 07:26
Location: Australia

Re: Hotkey not working if first Line defines a Class

05 Nov 2014, 03:40

Yeah that's really strange.. I was just about to reply saying that the hotkey worked fine for me but then when I upgraded my version from 1.1.14.03 to 1.1.16.05 it stopped working. :?
lexikos
Posts: 6591
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Hotkey not working if first Line defines a Class

15 Nov 2014, 17:19

It is a bug, and ListLines will show you that it is executing the static initializer.
lexikos
Posts: 6591
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Hotkey not working if first Line defines a Class

27 Dec 2014, 01:13

Fixed in v1.1.17.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 10 guests