BTW, is this the answer to nubAHK (or inevitable universe balancing) ?
Perhaps you should make a wiki or something
dont be mean.
BTW, is this the answer to nubAHK (or inevitable universe balancing) ?
Perhaps you should make a wiki or something
class Ihtpc.... . . . property VideoRenderer get { return this.MPC.Video } endprop property AudioRenderer get { return this.MPC.UseReclock ? this.RC.KS_Device : this.MPC.Audio } endprop method __Get(name) { static def, prim ; app specific Playback monitor device if (name="mon" || name="monitor") { if !def def := this.displays.defindex return this.displays[def] } ; Windows primary monitor device if (name="prim" || name="primary") { if !prim prim := this.displays.primindex return this.displays[prim] } } . . . endclass
property monitor alias mon
; In place of "alias": property monitor = mon ; assert equality, or property monitor := mon ; assign name ; To allow __Get and __Set to be extended: property this[params] { ... }
...
Of course your custom __Get handler is going to be skipped as the property __Get handler is at the very end of the Object() call used to create the base object. In your particular case you're using it to make aliases. Perhaps I should implement them?
property Units[id] { get { return DllCall(... ..., "int", id, ... ...) } }