View Issue Details

IDProjectCategoryView StatusLast Update
0037180LazarusWidgetsetpublic2020-06-07 05:12
ReporterGvozdev A. Feodor Assigned ToDmitry Boyarintsev  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version2.0.9 (SVN) 
Summary0037180: Cocoa interface fails to be built
DescriptionRevision 63179 (branches/fixes_2_0) fails to rebuild Lazarus on macOS Catalina 10.15.4 and FPC 3.2.0-beta (svn revision 45460, branches/fixes_3_2).
Build process aborts with the following error: cocoascrollers.pas(53,15) Error: There is no method in an ancestor class to be overridden: "setDocumentView(id);"
Steps To ReproduceJust select rebuild Lazarus with any profile.
Additional InformationmacOS version: 10.15.4
FPC 3.2.0 beta (branch fixes_3_2_0, revision 45460 (2020-05-22 13:35:15 +0300) )
Lazarus 2.0.9 (branch fixes_2_0, revision 63179 (2020-05-17 18:15:38 +0300) )
XCode version 11.5
xcode-select version 2373
command-line tools installed.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetCocoa
Attached Files

Relationships

duplicate of 0037140 resolvedDmitry Boyarintsev MacOS build errors for cocoascrollers 

Activities

Gvozdev A. Feodor

2020-06-06 10:12

reporter   ~0123255

Small workaround with fpc sources helped but unsure if there are any side-effects.
Attached a patch for fpc (NSScrollView.inc) and lazarus (cocoascrollers.pas).
Fix is just a synchronization of method declaration in both classes.
cocoascrollers.patch (644 bytes)   
Index: lcl/interfaces/cocoa/cocoascrollers.pas
===================================================================
--- lcl/interfaces/cocoa/cocoascrollers.pas     (revision 63310)
+++ lcl/interfaces/cocoa/cocoascrollers.pas     (working copy)
@@ -52,7 +52,7 @@
     function lclContentView: NSView; override;
     procedure setDocumentView(aView:
       {$if FPC_FULLVERSION < 30200}NSView{$else}id{$endif}
-    ); override;
+    ); message 'setDocumentView:'; override;
     procedure scrollContentViewBoundsChanged(notify: NSNotification); message 'scrollContentViewBoundsChanged:';
     procedure resetScrollRect; message 'resetScrollRect';
cocoascrollers.patch (644 bytes)   
NSScrollView.patch (1,236 bytes)   
Index: packages/cocoaint/src/appkit/NSScrollView.inc
===================================================================
--- packages/cocoaint/src/appkit/NSScrollView.inc       (revision 45588)
+++ packages/cocoaint/src/appkit/NSScrollView.inc       (working copy)
@@ -110,7 +110,7 @@
     class function contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType (fSize: NSSize; hFlag: ObjCBOOL; vFlag: ObjCBOOL; aType: NSBorderType): NSSize; message 'contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:'; deprecated 'in 10_0, 10_7, "+contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle: instead"';
     function documentVisibleRect: NSRect; message 'documentVisibleRect';
     function contentSize: NSSize; message 'contentSize';
-    procedure setDocumentView(newValue: NSView); message 'setDocumentView:';
+    procedure setDocumentView(newValue: {$if FPC_FULLVERSION < 30200}NSView{$else}id{$endif} ); message 'setDocumentView:';
     function documentView: NSView; message 'documentView';
     procedure setContentView(newValue: NSClipView); message 'setContentView:';
     function contentView: NSClipView; message 'contentView';
NSScrollView.patch (1,236 bytes)   

Issue History

Date Modified Username Field Change
2020-06-06 09:04 Gvozdev A. Feodor New Issue
2020-06-06 10:12 Gvozdev A. Feodor Note Added: 0123255
2020-06-06 10:12 Gvozdev A. Feodor File Added: cocoascrollers.patch
2020-06-06 10:12 Gvozdev A. Feodor File Added: NSScrollView.patch
2020-06-07 05:12 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2020-06-07 05:12 Dmitry Boyarintsev Status new => resolved
2020-06-07 05:12 Dmitry Boyarintsev Resolution open => duplicate
2020-06-07 05:12 Dmitry Boyarintsev LazTarget => -
2020-06-07 05:12 Dmitry Boyarintsev Widgetset Cocoa => Cocoa
2020-06-07 05:12 Dmitry Boyarintsev Relationship added duplicate of 0037140
2020-06-07 05:12 Dmitry Boyarintsev Status resolved => closed