View Issue Details

IDProjectCategoryView StatusLast Update
0036275LazarusLCLpublic2019-11-10 19:23
Reporternoname012Assigned ToDmitry Boyarintsev 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformmacOSmacOS CatalinaOS Version10.15.1
Product Version2.1 (SVN)Product Build62218 
Target VersionFixed in Version 
Summary0036275: Cocoa: cocoawsdialogs.pas(164,14) Error
DescriptionDuring compilation with FPC trunk v.43409 + Lazarus trunk v.62218 I get this compiler errors:

cocoawsdialogs.pas(164,14) Error: Objective-C messages require their Objective-C selector name to be specified using the "message" directive.
fpcupdeluxe: Start of compile error summary.
cocoawsdialogs.pas(164,14) Error: Mismatch between number of declared parameters and number of colons in message string.
fpcupdeluxe: Start of compile error summary.
cocoawsdialogs.pas(166,14) Error: Mismatch between number of declared parameters and number of colons in message string.
fpcupdeluxe: Start of compile error summary.
cocoawsdialogs.pas(167,15) Error: Mismatch between number of declared parameters and number of colons in message string.
fpcupdeluxe: Start of compile error summary.
cocoawsdialogs.pas(895) Fatal: There were 4 errors compiling module, stopping
cocoawsdialogs.pas(167,15) Error: Mismatch between number of declared parameters and number of colons in message string.
fpcupdeluxe: Start of compile error summary.
Fatal: Compilation aborted
TagsNo tags attached.
Fixed in Revision62227
LazTarget-
WidgetsetCocoa
Attached Files
  • p.patch (2,398 bytes)
    --- lcl/interfaces/cocoa/cocoawsdialogs.pas	(revision 62216)
    +++ lcl/interfaces/cocoa/cocoawsdialogs.pas	(working copy)
    @@ -132,7 +132,7 @@
         procedure setDialogFilter(ASelectedFilterIndex: Integer); message 'setDialogFilter:';
         procedure comboboxAction(sender: id); message 'comboboxAction:';
         // NSOpenSavePanelDelegateProtocol
    -    function panel_shouldEnableURL(sender: id; url: NSURL): Boolean; message 'panel:shouldEnableURL:';
    +    function panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean; message 'panel:shouldEnableURL:';
       end;
     
     implementation
    @@ -161,10 +161,10 @@
         selUrl: NSURL;
         filter: NSOpenSavePanelDelegateProtocol;
         procedure dealloc; override;
    -    function panel_shouldEnableURL(sender: id; url: NSURL): Boolean;
    +    function panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean;
         procedure panel_didChangeToDirectoryURL(sender: id; url: NSURL);
    -    function panel_userEnteredFilename_confirmed(sender: id; filename: NSString; okFlag: Boolean): NSString;
    -    procedure panel_willExpand(sender: id; expanding: Boolean);
    +    function panel_userEnteredFilename_confirmed(sender: id; filename: NSString; okFlag: LCLObjCBoolean): NSString;
    +    procedure panel_willExpand(sender: id; expanding: LCLObjCBoolean);
         procedure panelSelectionDidChange(sender: id);
       end;
     
    @@ -177,7 +177,7 @@
     end;
     
     function TOpenSaveDelegate.panel_shouldEnableURL(sender: id; url: NSURL
    -  ): Boolean;
    +  ): LCLObjCBoolean;
     begin
       if Assigned(filter) then
         Result := filter.panel_shouldEnableURL(sender, url)
    @@ -192,12 +192,12 @@
     end;
     
     function TOpenSaveDelegate.panel_userEnteredFilename_confirmed(sender: id;
    -  filename: NSString; okFlag: Boolean): NSString;
    +  filename: NSString; okFlag: LCLObjCBoolean): NSString;
     begin
       Result := filename;
     end;
     
    -procedure TOpenSaveDelegate.panel_willExpand(sender: id; expanding: Boolean);
    +procedure TOpenSaveDelegate.panel_willExpand(sender: id; expanding: LCLObjCBoolean);
     begin
     
     end;
    @@ -861,7 +861,7 @@
       lastSelectedItemIndex := indexOfSelectedItem;
     end;
     
    -function TCocoaFilterComboBox.panel_shouldEnableURL(sender: id; url: NSURL): Boolean;
    +function TCocoaFilterComboBox.panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean;
     var
       lPath, lExt, lCurExt: NSString;
       lExtStr, lCurExtStr: String;
    
    p.patch (2,398 bytes)

Activities

Dean Qin

2019-11-07 12:59

reporter   ~0119132

duplicated with 0036267

noname012

2019-11-09 08:15

reporter  

p.patch (2,398 bytes)
--- lcl/interfaces/cocoa/cocoawsdialogs.pas	(revision 62216)
+++ lcl/interfaces/cocoa/cocoawsdialogs.pas	(working copy)
@@ -132,7 +132,7 @@
     procedure setDialogFilter(ASelectedFilterIndex: Integer); message 'setDialogFilter:';
     procedure comboboxAction(sender: id); message 'comboboxAction:';
     // NSOpenSavePanelDelegateProtocol
-    function panel_shouldEnableURL(sender: id; url: NSURL): Boolean; message 'panel:shouldEnableURL:';
+    function panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean; message 'panel:shouldEnableURL:';
   end;
 
 implementation
@@ -161,10 +161,10 @@
     selUrl: NSURL;
     filter: NSOpenSavePanelDelegateProtocol;
     procedure dealloc; override;
-    function panel_shouldEnableURL(sender: id; url: NSURL): Boolean;
+    function panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean;
     procedure panel_didChangeToDirectoryURL(sender: id; url: NSURL);
-    function panel_userEnteredFilename_confirmed(sender: id; filename: NSString; okFlag: Boolean): NSString;
-    procedure panel_willExpand(sender: id; expanding: Boolean);
+    function panel_userEnteredFilename_confirmed(sender: id; filename: NSString; okFlag: LCLObjCBoolean): NSString;
+    procedure panel_willExpand(sender: id; expanding: LCLObjCBoolean);
     procedure panelSelectionDidChange(sender: id);
   end;
 
@@ -177,7 +177,7 @@
 end;
 
 function TOpenSaveDelegate.panel_shouldEnableURL(sender: id; url: NSURL
-  ): Boolean;
+  ): LCLObjCBoolean;
 begin
   if Assigned(filter) then
     Result := filter.panel_shouldEnableURL(sender, url)
@@ -192,12 +192,12 @@
 end;
 
 function TOpenSaveDelegate.panel_userEnteredFilename_confirmed(sender: id;
-  filename: NSString; okFlag: Boolean): NSString;
+  filename: NSString; okFlag: LCLObjCBoolean): NSString;
 begin
   Result := filename;
 end;
 
-procedure TOpenSaveDelegate.panel_willExpand(sender: id; expanding: Boolean);
+procedure TOpenSaveDelegate.panel_willExpand(sender: id; expanding: LCLObjCBoolean);
 begin
 
 end;
@@ -861,7 +861,7 @@
   lastSelectedItemIndex := indexOfSelectedItem;
 end;
 
-function TCocoaFilterComboBox.panel_shouldEnableURL(sender: id; url: NSURL): Boolean;
+function TCocoaFilterComboBox.panel_shouldEnableURL(sender: id; url: NSURL): LCLObjCBoolean;
 var
   lPath, lExt, lCurExt: NSString;
   lExtStr, lCurExtStr: String;
p.patch (2,398 bytes)

noname012

2019-11-09 08:15

reporter   ~0119171

With the recent update of cocoawsdialogs, NSOpenSavePanelDelegateProtocol needs to have LCLObjCBoolean.
Added a patch that solves the compiler errors.

Dmitry Boyarintsev

2019-11-10 18:33

developer   ~0119194

Last edited: 2019-11-10 18:34

View 2 revisions

thanks for the patch! applied
please test and close if ok

noname012

2019-11-10 19:22

reporter   ~0119199

thank you to you.

Issue History

Date Modified Username Field Change
2019-11-07 12:02 noname012 New Issue
2019-11-07 12:59 Dean Qin Note Added: 0119132
2019-11-09 08:15 noname012 File Added: p.patch
2019-11-09 08:15 noname012 Note Added: 0119171
2019-11-10 18:33 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2019-11-10 18:33 Dmitry Boyarintsev Status new => resolved
2019-11-10 18:33 Dmitry Boyarintsev Resolution open => fixed
2019-11-10 18:33 Dmitry Boyarintsev Fixed in Revision => 62227
2019-11-10 18:33 Dmitry Boyarintsev LazTarget => -
2019-11-10 18:33 Dmitry Boyarintsev Widgetset Cocoa => Cocoa
2019-11-10 18:33 Dmitry Boyarintsev Note Added: 0119194
2019-11-10 18:34 Dmitry Boyarintsev Note Edited: 0119194 View Revisions
2019-11-10 19:22 noname012 Note Added: 0119199
2019-11-10 19:23 noname012 Status resolved => closed