Recent

Author Topic: Bug in TOpenDialog  (Read 2427 times)

VTwin

  • Hero Member
  • *****
  • Posts: 785
  • Former Turbo Pascal 3 user
Bug in TOpenDialog
« on: August 17, 2018, 01:36:42 am »
The attached project using a TOpenDialog fails in Cocoa. Seems fine on other platforms. I'd appreciate any confirmation.

Cheers,
VTwin

Edit: Using current trunk.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.4 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.4 (64 bit on VBox)
fpc 3.0.4

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2280
    • havefunsoft.com
Re: Bug in TOpenDialog
« Reply #1 on: August 17, 2018, 02:23:16 am »
you want to fix your gOpenDataFileFilter as following:
Code: Text  [Select]
  1. const
  2.   gOpenDataFileFilter : string =
  3.     'All Files (*.*)|*.*|' +
  4.     'Tab Delimited (*.tsv)|*.tsv;*.tab|' +
  5.     'Comma Delimited (*.csv)|*.csv|' +
  6.     'Tab Delimited (*.txt)|*.txt|' +
  7.     'OpenDocument XML (*.ods)|*.ods|' + // <-- missed a pipe after .ods
  8.     'Excel 2003 (*.xls)|*.xls|' +
  9.     'Excel XML (*.xlsx)|*.xlsx';
  10.  
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

VTwin

  • Hero Member
  • *****
  • Posts: 785
  • Former Turbo Pascal 3 user
Re: Bug in TOpenDialog
« Reply #2 on: August 17, 2018, 02:29:18 am »
Excellent!! That works. Thanks so much. Only Cocoa seems to catch the error.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.4 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.4 (64 bit on VBox)
fpc 3.0.4

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2280
    • havefunsoft.com
Re: Bug in TOpenDialog
« Reply #3 on: August 17, 2018, 02:50:23 am »
Not anymore
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

VTwin

  • Hero Member
  • *****
  • Posts: 785
  • Former Turbo Pascal 3 user
Re: Bug in TOpenDialog
« Reply #4 on: August 17, 2018, 06:32:21 pm »
Not anymore

Excellent. Thanks to all for the work on this, I look forward to the next stable release. 
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.4 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.4 (64 bit on VBox)
fpc 3.0.4