Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-10

Patch for Grids.pas - Adds soVisibleOnly to SaveOptions

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexsander Rosa

- adds soVisibleOnly to SaveOptions
- with soVisibleOnly saves only visible columns
- without (default) it works as before

Atenciosamente, Alexsander da Rosa -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121016/7ff3e229/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: grids.patch Type: application/octet-stream Size: 2231 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121016/7ff3e229/attachment.obj>

Reply by email

Jesus Reyes
to Alexsander Rosa
- adds soVisibleOnly to SaveOptions - with soVisibleOnly saves only visible columns

-> without (default) it works as before

I think using some SaveOptions options only for XML and some only for CSV might cause confusion.

The problem with SaveOptions is that it's supposed to apply only to Save/LoadFromFile (I wish to have named SaveToCSVFile as ExportToCSVFile instead) visibility on CustomColumns should be preserved on saving/loading to/from a XML file (that by the way is missing), but it's ok to export only visble columns to ?CSV file. So what about adding yet another parameter to CSV functions?,

Even, if more features continue to be added to CSV support, it may be better to move the whole CSV support out of grids unit and create a component or something.

What you think.

Jesus Reyes A.

Reply by email

Alexsander Rosa
to Jesus Reyes

In that case, I would prefer to add another parameter to *SaveToCSVFile*: boolean "VisibleColumnsOnly" with default false.
The procedure *LoadFromCSVFile* requires no change, as the CSV does not have visibility information.

2012/10/16 Jesus Reyes

Show quoted text 25 lines
>- adds soVisibleOnly to SaveOptions >- with soVisibleOnly saves only visible columns -> without (default) it works as before I think using some SaveOptions options only for XML and some only for CSV might cause confusion. The problem with SaveOptions is that it's supposed to apply only to Save/LoadFromFile (I wish to have named SaveToCSVFile as ExportToCSVFile instead) visibility on CustomColumns should be preserved on saving/loading to/from a XML file (that by the way is missing), but it's ok to export only visble columns to CSV file. So what about adding yet another parameter to CSV functions?, Even, if more features continue to be added to CSV support, it may be better to move the whole CSV support out of grids unit and create a component or something. What you think. Jesus Reyes A.
Atenciosamente, Alexsander da Rosa -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121016/e5078d78/attachment.html>

Reply by email

Alexsander Rosa
to Alexsander Rosa

New approach.

2012/10/16 Alexsander Rosa

Show quoted text 6 lines
In that case, I would prefer to add another parameter to *SaveToCSVFile*: boolean "VisibleColumnsOnly" with default false. The procedure *LoadFromCSVFile* requires no change, as the CSV does not have visibility information. --

Atenciosamente,
Alexsander da Rosa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121016/7a6c525f/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: grids.patch
Type: application/octet-stream
Size: 3128 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121016/7a6c525f/attachment-0001.obj>

Reply by email