View Issue Details

IDProjectCategoryView StatusLast Update
0021728LazarusLCLpublic2012-04-24 14:47
ReporterDavid Jenkins Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0021728: Wrong variable set in TCarbonTabsControl.SetPageIndex
DescriptionThis looks like a bug in TCarbonTabsControl (the setting ATabIndex := -1).

    if (ATabIndex < 0) or (ATabIndex >= FTabs.Count) then
    begin
      // this PageIndex does not exist. This should only happen if AIndex<0
      {if AIndex>=0 then
      begin
        Debugln(['TCarbonTabsControl.SetPageIndex unknown pageindex: ',AIndex]);
      end;}
      ATabIndex := -1;
      SetControl32BitValue(ControlRef(Widget), 0);
      ShowTab;
      Exit;
    end;

    FTabIndex := ATabIndex;


I don't see any need to set ATabIndex but setting FTabIndex does make sense as it will clear the pages.

Patch against rev 36681 attached
TagsNo tags attached.
Fixed in Revision36958
LazTarget-
WidgetsetCarbon
Attached Files

Activities

2012-04-13 16:23

 

carbontabs.pp.patch (428 bytes)   
--- /Users/djenkins/laz-changes/13951/carbontabs.pp	2012-04-10 14:15:24.000000000 
+++ /Users/djenkins/laz-changes/13951/carbontabs.pp.ss	2012-04-10 14:17:47.000000000 
@@ -1016,7 +1016,7 @@
       begin
         Debugln(['TCarbonTabsControl.SetPageIndex unknown pageindex: ',AIndex]);
       end;}
-      ATabIndex := -1;
+      FTabIndex := -1;
       SetControl32BitValue(ControlRef(Widget), 0);
       ShowTab;
       Exit;
carbontabs.pp.patch (428 bytes)   

2012-04-19 21:20

 

svn_patch-21728 (482 bytes)   
Index: lcl/interfaces/carbon/carbontabs.pp
===================================================================
--- lcl/interfaces/carbon/carbontabs.pp	(revision 36681)
+++ lcl/interfaces/carbon/carbontabs.pp	(working copy)
@@ -1016,7 +1016,7 @@
       begin
         Debugln(['TCarbonTabsControl.SetPageIndex unknown pageindex: ',AIndex]);
       end;}
-      ATabIndex := -1;
+      FTabIndex := -1;
       SetControl32BitValue(ControlRef(Widget), 0);
       ShowTab;
       Exit;
svn_patch-21728 (482 bytes)   

Zeljan Rikalo

2012-04-21 17:14

developer   ~0058844

Please test and close if ok

Issue History

Date Modified Username Field Change
2012-04-13 16:23 David Jenkins New Issue
2012-04-13 16:23 David Jenkins File Added: carbontabs.pp.patch
2012-04-13 16:23 David Jenkins Widgetset => Carbon
2012-04-19 21:20 David Jenkins File Added: svn_patch-21728
2012-04-21 17:14 Zeljan Rikalo Fixed in Revision => 36958
2012-04-21 17:14 Zeljan Rikalo LazTarget => -
2012-04-21 17:14 Zeljan Rikalo Status new => resolved
2012-04-21 17:14 Zeljan Rikalo Resolution open => fixed
2012-04-21 17:14 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-04-21 17:14 Zeljan Rikalo Note Added: 0058844
2012-04-24 14:47 David Jenkins Status resolved => closed