I don't think it's that line. The error references RemoveLine, but the line you're saying is causing the error doesn't remove a line; it adds one. My best guess is that it's the next line, but I can't be sure unless you give me the entire file so I can cross reference the line numbers. I'm on an airplane now, posting this via the in-plane WiFi (painfully slow in-plane WiFi, might I add. But I am on a plane, thousands of feet up in the air, so I'm not sure why I expected better), so I can't test what DListView:GetSelected
returns. But my guess is that when it returns a table of the lines (according to the wiki), it's not returning a table of the line numbers. I'll do some spelunking in the code for DListView to see what exactly GetSelected returns and how to get the line number from a line (because it doesn't seem to be documented in the wiki) and get back to you.
edit 2: The magic of GitHub strikes again. If the version of DListView_Line on GitHub is to be trusted, then you should be able to do something like Line:GetID()
and supply that as the argument to DListView:RemoveLine(). I should probably be a good citizen and document this on the wiki, but I'm lazy and not looking forward to waiting for the page to load on this slow WiFi. Maybe once I get home.
An additional, less important, fact is that DListView:GetSelected() is identical to DListView:GetSelected() (according to the wiki
, at least. It's proven to be less than accurate in the past, but usually pretty good).
edit: Looking back at the previous replies, I'm very much confused what this has to do with XLib or making things invisible.