LV_Rows(https://github.com/Pulover/Class_LV_Rows) which extends LV_EX(https://github.com/AHK-just-me/LV_EX).
I have managed to get the Copy, Cut, Paste, and Delete methods working within a singular ListView. What I am trying to figure out now is how to make CopyData shared between instances of the class without making it a global variable (or a better way to make it work). I need help understanding the concept used in the LV_Rows class and how one would convert that to v2.
My plan is to create a single instance of "MyClass" and pass multiple ListView HWNDs to it. The methods within this class would handle the copying and pasting between each ListView (using those HWND's). I figure this approach should work because the class can reference CopyData, and use it to manage the data between the ListView HWNDs. The class will include methods to copy, cut, and paste, etc.
I can't figure out how to make this happen. As you can see, the moment I add "extends Gui.ListView", what I have come up with, stops working.
Maybe I am going about this the wrong way. I could use some advice, and any help would be appreciated.
This works:
Code: Select all
myObj := MyClass("LV1Hwnd", "LV2Hwnd")
Loop myObj.handle.Length
MsgBox(myObj.handle[A_Index])
Class ListViewExtensions {
; whatever
}
Class MyClass extends ListViewExtensions {
__New(hwnd*) {
this.handle := hwnd
}
}
This doesn't work:
Code: Select all
myObj := MyClass("LV1Hwnd", "LV2Hwnd")
Loop myObj.handle.Length
MsgBox(myObj.handle[A_Index])
Class ListViewExtensions extends Gui.ListView { ; 'extends Gui.ListView' causes it to stop working.
; whatever
}
Class MyClass extends ListViewExtensions {
__New(hwnd*) {
this.handle := hwnd
}
}