Transparency issues with #10Seattle ?

Transparency issues with ?

Update: Enabling Runtime Themes in Project Options, solves this issue.

I’m having some transparency weirdness issues which I find difficult to recreate in a SSCE.  In the attached image, you can see a login dialog in design mode at upper left, and some of it’s properties at the right – and in the middle – the running dialog.  You see those three white spaces that is not in design mode?  That’s TLabels that fail to be transparent.

In the .dfm, the highlighted label looks like:

  object lAppDetail: TLabel

    Left = 33

    Top = 82

    Width = 54

    Height = 14

    Caption = ‘lAppDetail’

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clInfoBk

    Font.Height = -12

    Font.Name = ‘Tahoma’

    Font.Style = []

    ParentFont = False

  end

The labels are transparent when compiled with XE7.

Here comes the weird part: To make the label transparent again, I just uncheck and recheck the transparent property, which adds the transparent property.

  object lAppDetail: TLabel

    Left = 33

    Top = 82

    Width = 54

    Height = 14

    Caption = ‘lAppDetail’

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clInfoBk

    Font.Height = -12

    Font.Name = ‘Tahoma’

    Font.Style = []

    ParentFont = False

    Transparent = True

  end

So – I try to recreate in an SCCE – I create a new form in XE7, add an image, add a label, set the same colors, etc. It’s transparent when running in XE7.  I open the project in 10Seattle – and it is transparent when running there too! And there is no Transparent = True property in the .dfm.

Weird or what?

Refactoring: Change of type name does not change type for record helper.

Refactoring: Change of type name does not change type for record helper. When using Ctrl-Shift-E to rename a type, a reference to the type in a record helper will not be affected. The expected behaviour is that the type is replaced in the record helper declaration as well. Problem verified for and XE7.1, but probably exists in XE8.x and versions prior to XE7 as well.

https://quality.embarcadero.com/browse/RSP-12384

Missing warning?

Missing warning?

type

  TMyClass = class abstract (TObject)

     // Lots of methods, but none of them abstract;

  end;

  TMyImplementedClass = class(TMyClass)

    // Overrides some of the parent methods and adds new ones

   end;

var

   TFoo: TMyClass;

begin

   TFoo := TMyClass.Create;  *// WHAT!? No Warnings!?*

 

The XE2 to XE7 documentation states…

http://docwiki.embarcadero.com/RADStudio/XE7/en/Classes_and_Objects

states “Note: Delphi allows instantiating a class declared abstract, for backward compatibility, but this feature should not be used anymore.” – which is all dandy, but not issuing a warning for such use, that seems wrong to me.

Interestingly, the XE version is different…

http://docwiki.embarcadero.com/RADStudio/XE/en/Classes_and_Objects

and says “If a class is marked abstract, then it cannot be instantiated directly using the Create constructor. “

When did they introduce this keyword – and why did they not stick with the XE design?  Go figure…

Is there a QP or QC for this?

RSP-10216 Code completion for class property generates code that won’t compile

RSP-10216 Code completion for class property generates code that won’t compile

Using code completion for the following block

type

  TMyClass = class

  private

    class var FProp1: String;

    class procedure SetProp1(const Value: String); static;

   public

     class procedure Test;

     class property Prop1:String read FProp1 write SetProp1;

     class property Prop2:Integer;

   end;

generates

type

  TMyClass = class

  private

    class var FProp1: String;

    class // [dcc32 Error]: E2123 PROCEDURE, FUNCTION, PROPERTY, or VAR expected

    class var FProp2: Integer; procedure SetProp1(const Value: String); static;

    class procedure SetProp2(const Value: Integer); static;

   public

     class procedure Test;

     class property Prop1:String read FProp1 write SetProp1;

     class property Prop2:Integer read FProp2 write SetProp2;

   end;

https://quality.embarcadero.com/browse/RSP-10216

To celebrate that quality.embarcadero.com finally has a solid certificate… err… is back online :P

To celebrate that quality.embarcadero.com finally has a solid certificate… err… is back online 😛

RSP-10215: Code completion for record property generates code that won’t compile

Using code completion (Ctrl+Shift+C) in

RMyRecord = record

  property Prop1:String;

end;

generates

RMyRecord = record

  private

    FProp1: String;

    procedure SetProp1(const Value: String);

  published * [dcc32 Error]: E2184 PUBLISHED section valid only in class types*

    property Prop1:String read FProp1 write SetProp1;

end;

https://quality.embarcadero.com/browse/RSP-10215

XE7 and more With weirdness

XE7 and more With weirdness

100% reproducable fail: Access violation at address 00B5464D in module ‘MyApp.exe’. Read of address 00000040.

Fails:

    tpLot := Tp.Add;

    with tpLot do

    begin

      LotId := Lot.Id; // <–BANG

      LotNo := Lot.LotNumber;

      ExpiryDate := Lot.ExpireDate;

      ProducedDate := Lot.ProducedStartTime;

      ArticleId := ArtSum.ArticleId;

      ArticleNo := ArtSum.ArticleNumber;

      OriginalArticleId := ArtSum.ArticleId;

      Quantity := NumDPacks * ArtSum.BaseUnitsPerKPack;

      NetWeight := Quantity * ArtSum.NetWeightPrBaseUnit;

      GrossWeight := NetWeight +

        (ArtSum.TaraWeightPrFPack * Quantity);

      LotLockState := Lot.LockStateCode;

    end;

Works:

    tpLot := Tp.Add;

    tpLot.LotId := Lot.Id;

    tpLot.LotNo := Lot.LotNumber;

    tpLot.ExpiryDate := Lot.ExpireDate;

    tpLot.ProducedDate := Lot.ProducedStartTime;

    tpLot.ArticleId := ArtSum.ArticleId;

    tpLot.ArticleNo := ArtSum.ArticleNumber;

    tpLot.OriginalArticleId := ArtSum.ArticleId;

    tpLot.Quantity := NumDPacks * ArtSum.BaseUnitsPerKPack;

    tpLot.NetWeight := tpLot.Quantity * ArtSum.NetWeightPrBaseUnit;

    tpLot.GrossWeight := tpLot.NetWeight + (ArtSum.TaraWeightPrFPack * tpLot.Quantity);

    tpLot.LotLockState := Lot.LockStateCode;

Lot and ArtSum are properly initated and readable (inspected in debugger), so I assume it is the assignment that fails.

The problem is, I cannot reproduce in a mini-example.

If I wasn’t set at eradicating all with statements before, I surely am now.