Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does an asterisk in the Object Inspector mean?

In Delphi's object inspector, I see an asterisk behind a property name (ConnectionName*):

Asterisk in object inspector

How does it get there, and above all: what does it mean?

In the sourcecode for TMySQLConnection I don't see anything special, so I guess it's some design-time thing?

update

It has something to do with the contents of the TSQLConnection.

To reproduce, paste the code below on a form.

After some playing around, I conclude that the asterisk appears when the Params property gets edited so that it doesn't have the default values any longer. It's still a mystery to me how this is achieved though.

object SQLConnection1: TSQLConnection
  ConnectionName = 'MySQLConnection'
  DriverName = 'MySQL'
  LoginPrompt = False
  Params.Strings = (
    'DriverUnit=Data.DBXMySQL'

      'DriverPackageLoader=TDBXDynalinkDriverLoader,DbxCommonDriver190.' +
      'bpl'

      'DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borla' +
      'nd.Data.DbxCommonDriver,Version=19.0.0.0,Culture=neutral,PublicK' +
      'eyToken=91d62ebb5b0d1b1b'

      'MetaDataPackageLoader=TDBXMySqlMetaDataCommandFactory,DbxMySQLDr' +
      'iver190.bpl'

      'MetaDataAssemblyLoader=Borland.Data.TDBXMySqlMetaDataCommandFact' +
      'ory,Borland.Data.DbxMySQLDriver,Version=19.0.0.0,Culture=neutral' +
      ',PublicKeyToken=91d62ebb5b0d1b1b'
    'GetDriverFunc=getSQLDriverMYSQL'
    'LibraryName=dbxmys.dll'
    'LibraryNameOsx=libsqlmys.dylib'
    'VendorLib=LIBMYSQL.dll'
    'VendorLibWin64=libmysql.dll'
    'VendorLibOsx=libmysqlclient.dylib'
    'MaxBlobSize=-1'
    'DriverName=MySQL'
    'HostName='
    'Database='
    'User_Name=xxx'
    'Password='
    'ServerCharSet='
    'BlobSize=-1'
    'ErrorResourceFile='
    'LocaleCode=0000'
    'Compressed=True'
    'Encrypted=False'
    'ConnectTimeout=60')
  Left = 48
  Top = 24
end
like image 460
Wouter van Nifterick Avatar asked Apr 17 '14 13:04

Wouter van Nifterick


People also ask

What is the asterisk symbol used for?

An asterisk is a star-shaped symbol (*) that has a few uses in writing. It is most commonly used to signal a footnote, but it is sometimes also used to clarify a statement or to censor inappropriate language.

What does an asterisk before a word mean?

In linguistics, an asterisk is placed before a word or phrase to indicate that it is not used, or there are no records of it being in use.

Is asterisk a punctuation mark?

An asterisk is a punctuation mark that you can use to note something in writing, or to stand in for something you've left out.


1 Answers

You have appeared to have reverse engineered the meaning of the asterisk. Since I guess you have no source for the design time component code you'll need to rely on such reverse engineering, or any documentation that you can find.

In the comments you wonder how the component could cause the Object Inspector to display the asterisk. In order to do so the component would register a property editor that overrides TPropertyEditor.GetName. By doing so it can return any name it fancies and the Object Inspector will faithfully display that name.

To illustrate I've taken one of my own property editors, and hacked it around like so:

type
  TMinMaxGridColumnProperty = class(TFloatProperty)
  public
    function GetName: string; override;
    ....
  end;

function TMinMaxGridColumnProperty.GetName: string;
begin
  Result := inherited GetName + '*';
end;

And now the properties that are served by this property editor appear like this in the Object Inspector:

enter image description here

So it seems almost certain to me that this is how the component you are working with is effecting this. The design time code will use the state of the component to determine whether or not to append the asterisk.

like image 107
David Heffernan Avatar answered Nov 09 '22 16:11

David Heffernan