Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Wochele Newsgroups: comp.lang.clipper.visual-objects Subject: Re: How to copy a listview variable? Date: Thu, 15 Feb 2018 07:47:16 +0100 Organization: solani.org Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: solani.org 1518677243 15029 eJwFwQkBwDAIA0BLfMmGHGjBv4Tewak8XxAMLDY1i/9qyxEDPQIdU2YaK0w67kyVK8X6Wj8FsxCI (15 Feb 2018 06:47:23 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 15 Feb 2018 06:47:23 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: X-NNTP-Posting-Host: eJwVxsERwDAIA7CVSgETxoEQ7z9C2tNHrhDsMDjM+Yu1VjNsMJI+9e54jrKtvnYaC6eECbVmXimWEdU= Cancel-Lock: sha1:u/0kbGPkpazZSq5QGp6jgjsOI4I= X-User-ID: eJwNwokRwDAIA7CV+IxZJ1Cy/wjpSfDUHEYiA/dXVCJho8xPG7xOWPBssKJaoGsnKML1ngf0cA/n Xref: csiph.com comp.lang.clipper.visual-objects:11358 Hi Dick, usually I would say you could use aclone() with VO-objects. But I don't think that this will work because in a listview you remove the columns in the underlying windows-object. No idea how you can handle this. Karl Am 14.02.2018 um 17:09 schrieb D.J.W. van Kooten: > We show a listview in a window and use that LV variable to pass to a > method to export the contents to Excel. > > Now 1 client wants to see a few of these columns omiitted in the Excel > export. It is not difficult ti remove the columns > (oLVl:DeleteColumn(2) etc) but thet should not be deleted in the > 'master' listview showing in the screen. > > Problem is that doing this: > > oLVCopy:=oLVOriginal > > and then delete the columns in oLVCopy also deletes these columns in > oLVOriginal, which is apparently copied by reference. > > What would be the quickets way to copy the listview in such a way that > I can still pass it after deleting the required columns to my Excel > function without changing the original listview? > > Dick >