Attributes and Array of Const

Attributes and Array of Const

How annoying!

type

  Values = class(TCustomAttribute)

    Constructor Create(const Name: String; Params: array of const);

  end;

  TMyClass = class

   …  

  public

    [Values(‘Default’, [1, 2.0, ‘three’])]  <– E2026

    property List1: TMyVariantList; 

E2026 – Constant expression expected

and what a tragic help entry :/

http://docwiki.embarcadero.com/RADStudio/XE5/en/E2026_Constant_expression_expected_(Delphi)

Question: In what way is that array not constant at compile time?

Reinventing Delphi for the masses.

Reinventing Delphi for the masses.

(A spinoff from the post by Colin Johnsun)

This might appall some, and appeal to others. Keep an open mind as this is just a brain fart from yours truly.

EMBT continues to offer the current versions as before, but adds a new offering:  You get the tool free of charge with an attached account in the “Embarcadero App Store” where you can give away or sell your app on various platforms. Or, you pay $xx/year for extended services such as hosted VCS, product forums and issue trackers. 

In fact, you don’t even compile locally – but in the cloud, directly to your app store and to the various platforms. This will give EMBT a wealth of info on reproducable internal errors, and the compiler can be upgraded with zero deployment cost.  In theory, a simplfied IDE might even be web hosted, and debugging done on platform emulators in the cloud.

The app store can have mechanisms for allowing access to test versions for test users and release versions for regular customers. If you sell your app, EMBT get the customary 25-30% of the income.  EMBT may even offer access to cloud DB services for your apps for a price, either paid by you – or by the end-user.

Surely, I am not the first to think along these lines, Marco Cantù?