View Issue Details

IDProjectCategoryView StatusLast Update
0037068LazarusWidgetsetpublic2020-05-15 23:38
ReporterC Western Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformi386OSDarwin 
Product Version2.0.9 (SVN) 
Summary0037068: Current trunk does not compile carbon widget set
DescriptionThe recent removal of the ReadOnly property means that the carbon widget set no longer compiles. I tried a possible fix, but it didn't work for me (I couldn't make the find dialog work in the IDE, for example.)
TagsNo tags attached.
Fixed in Revisionr63164
LazTarget-
WidgetsetCarbon
Attached Files

Relationships

related to 0036978 resolvedJuha Manninen TComboBox needs to have the READONLY property re-enabled. 
related to 0037009 closedDmitry Boyarintsev Lazarus fails to build on macOS after r63109 

Activities

Juha Manninen

2020-05-13 23:27

developer   ~0122775

Copied from my note in the related 0037009:
Assignments to ReadOnly can be removed completely. They had no effect even before the property was deleted which was misleading.
Reading ReadOnly should be replaced with :
 "Style in [csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable];"
That is what the property getter used to return.

C Western

2020-05-14 09:44

reporter   ~0122784

The fix you suggested was the possible fix I tried. I could make trunk compile, but, as mentioned in my original report, the find dialog in the IDE didn't work - it was not possible to enter new text to search for.

C Western

2020-05-14 22:25

reporter   ~0122809

In fact the fix suggested looks fine; because of the bug I hadn't updated the binary when applying it. I think only the attached patch is needed
combo.patch (1,607 bytes)   
diff -uwNr --exclude=.svn --exclude=Makefile --exclude=Makefile.fpc --exclude=Makefile.compiled --exclude='*.rsj' --exclude='*.bak' --exclude='*.po' lazarus/lcl/interfaces/carbon/carbonedits.pp lazarus.w/lcl/interfaces/carbon/carbonedits.pp
--- lazarus/lcl/interfaces/carbon/carbonedits.pp	2019-04-11 18:59:05.000000000 +0100
+++ lazarus.w/lcl/interfaces/carbon/carbonedits.pp	2020-05-14 21:00:38.000000000 +0100
@@ -678,7 +678,7 @@
   CFString: CFStringRef;
   TmpSpec: EventTypeSpec;
 begin
-  FReadOnly := (LCLObject as TCustomComboBox).ReadOnly;
+  FReadOnly := (LCLObject as TCustomComboBox).Style in [csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable];
   FLastDroppedDown := False;
   
   if FReadOnly then
diff -uwNr --exclude=.svn --exclude=Makefile --exclude=Makefile.fpc --exclude=Makefile.compiled --exclude='*.rsj' --exclude='*.bak' --exclude='*.po' lazarus/lcl/interfaces/carbon/carbonwsstdctrls.pp lazarus.w/lcl/interfaces/carbon/carbonwsstdctrls.pp
--- lazarus/lcl/interfaces/carbon/carbonwsstdctrls.pp	2019-04-11 18:59:05.000000000 +0100
+++ lazarus.w/lcl/interfaces/carbon/carbonwsstdctrls.pp	2020-05-14 21:01:30.000000000 +0100
@@ -442,7 +442,7 @@
 begin
   if not CheckHandle(ACustomComboBox, Self, 'SetStyle') then Exit;
 
-  TCarbonComboBox(ACustomComboBox.Handle).SetReadOnly(ACustomComboBox.ReadOnly);
+  TCarbonComboBox(ACustomComboBox.Handle).SetReadOnly(ACustomComboBox.Style in [csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable]);
   sz:=TCarbonComboBox(ACustomComboBox.Handle).GetPreferredSize;
   ACustomComboBox.Constraints.SetInterfaceConstraints(0,0,0,sz.Y);
 end;
combo.patch (1,607 bytes)   

Juha Manninen

2020-05-15 23:38

developer   ~0122827

Applied, thanks.

Issue History

Date Modified Username Field Change
2020-05-13 22:34 C Western New Issue
2020-05-13 23:24 Juha Manninen Relationship added related to 0036978
2020-05-13 23:24 Juha Manninen Relationship added related to 0037009
2020-05-13 23:27 Juha Manninen Note Added: 0122775
2020-05-14 09:44 C Western Note Added: 0122784
2020-05-14 22:25 C Western Note Added: 0122809
2020-05-14 22:25 C Western File Added: combo.patch
2020-05-15 23:38 Juha Manninen Assigned To => Juha Manninen
2020-05-15 23:38 Juha Manninen Status new => assigned
2020-05-15 23:38 Juha Manninen Status assigned => resolved
2020-05-15 23:38 Juha Manninen Resolution open => fixed
2020-05-15 23:38 Juha Manninen Fixed in Revision => r63164
2020-05-15 23:38 Juha Manninen LazTarget => -
2020-05-15 23:38 Juha Manninen Widgetset Carbon => Carbon
2020-05-15 23:38 Juha Manninen Note Added: 0122827