VCL Ribbon revisited

VCL Ribbon revisited

How this made it through initial QA is a mystery.  Abstract errors (requiring an IDE restart), disappearing controls (requiring you to close and reopen the form), access violations (requiring an IDE restart), mouse caret getting trapped in region within IDE (requiring an IDE restart) – and trial and error the only way to figure it all out.

I am not a happy camper.

A colleague of mine spotted the weirdest XE6 bug so far.

A colleague of mine spotted the weirdest XE6 bug so far.

On an TMS TAdvStringGrid

1.

for i := 0 to Grid.RowCount – 1

 do Grid.RowHeights[i] := rh;

2.

for i := 0 to Grid.RowCount – 1

do begin

  Grid.RowHeights[i] := rh;

end;

Example 1 failed at setting all lines, Example 2 worked.

Does anyone know of an XE6  QC or QP that is related to “missing” begin/end enclosures?

Bug in refactoring in XE5.

Bug in refactoring in XE5.  

Can someone check this in XE6 and report if still an issue?

Use refactoring to rename constant CreateStoragePos to f.x. CreateStorage.

Result:  reference in attribute

    [TestCase(‘Create’, CreateStoragePos, NoSep)]

will not be renamed.

{code}

unit DUnitX_PSDStorage;

interface

uses

  DUnitX_PSDBase, PSDConstants, PSDStorage,

  DUnitX.TestFramework;

const

  CreateStoragePos = String(‘something’);

  ModifyStoragePos = String(‘something’);

type

  [TestFixture]

  TestTPSDStorageArea= class(TTestClass)

  public

    [Setup]

    procedure Setup; override;

    [TearDown]

    procedure TearDown; override;

    [Test]

    [TestCase(‘Create’, CreateStoragePos, NoSep)]

    procedure CreateFromJSON(const aJSON: String); override;

    [Test]

    function SaveToDB:TPSDResult; override;

    [Test]

    function ReadFromDb:TPSDResult; override;

    [Test]

    [TestCase(‘Modify’, ModifyStoragePos, NoSep)]

    function ChangeAndSave(const aJSON: String):TPSDResult; override;

    [Test]

    function DeleteFromDb:TPSDResult; override;

  end;

{code}

True or False or False = False!

True or False or False = False!

(True or False or False) = True.

function TPSDConnectionMonitor.IsOnline: Boolean;

var

  cState: TPSDConnectionState;

begin

  Result := (Not OfflineStoreEnabled) or (Not Enabled) or IsOnline(cState);

end;

See the picture.  

FOfflineStoreEnabled = False

FEnabled = True

IsOnline(cState) does an and between two states and returns False

The expression

 (Not OfflineStoreEnabled) or (Not Enabled) or IsOnline(cState)

is (True) or (False) or False

and Result is False!  

Add extra paranthesis to the expression 

( (Not OfflineStoreEnabled) or (Not Enabled) or IsOnline(cState))

is ((True) or (False) or False)

and Result is True as expected!

Can someone make sense of this?