Recent

Author Topic: Bug in TOpenDialog  (Read 3459 times)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • 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

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • 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.  

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • 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

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Bug in TOpenDialog
« Reply #3 on: August 17, 2018, 02:50:23 am »
Not anymore

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • 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

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

 

TinyPortal © 2005-2018