Jump to content

creating a component inherited from TuniDbComboBox


jeans_larghi

Recommended Posts

I'm creating a component inherited from TuniDbComboBox.

On the override the constructor shows the following message:

 

[DCC Hint] UniDBLookUpSesamo.pas(24): H2365 Override method TUniDBLookUpSesamo.create should match case of ancestor TUniCustomComboBox.Create

 

I attach a piece of code:

type
 TUniDBLookUpSesamo = class(TUniDBComboBox)
 private
   FeditAjaxPartenza: TUniEdit;
   FeditAjaxFine: TUniEdit;
   FuniHiddenPanel1: TUniHiddenPanel;
   procedure SeteditAjaxPartenza(const Value: TUniEdit);
   procedure SeteditAjaxFine(const Value: TUniEdit);
   procedure SetuniHiddenPanel1(const Value: TUniHiddenPanel);
   { Private declarations }
 protected
   { Protected declarations }
 public
   { Public declarations }
   constructor create(Aowner :TComponent);override;
 published
   { Published declarations }
   property editAjaxPartenza : TUniEdit read FeditAjaxPartenza write SeteditAjaxPartenza;
   property editAjaxFine : TUniEdit read FeditAjaxFine write SeteditAjaxFine;
   property uniHiddenPanel1 : TUniHiddenPanel read FuniHiddenPanel1 write SetuniHiddenPanel1;
 end;
...

constructor TUniDBLookUpSesamo.create(Aowner: TComponent);
var mioAjax, mioInizio,miaFine: string;
begin
 inherited;
...
ClientEvents.UniEvents.add(

                 'OnAfterCreate=function OnAfterCreate(sender)'#13#10'{'#13#10'      sender.ty' +
                 'peAhead = false;'#13#10'      sender.forceSelection = false;'#13#10'      se' +
                 'nder.triggerAction = '#39'all'#39';'#13#10'      sender.editable = true;'#13#10'    ' +
                 '  sender.maxHeight = 100;'#13#10'      sender.resizable = true;'#13#10'     ' +
                 ' sender.queryDelay = 500;'#13#10'      sender.minChars = 2;'#13#10'      sen' +
                 'der.disableKeyFilter = true;'#13#10'      sender.selectOnFocus = true;' +
                 #13#10'      sender.lazyRender = true;'#13#10'      validationDelay = 500;'#13 +
                 #10'}'+
...

 

Thanks and best regards

Link to comment
Share on other sites

I'm creating a component inherited from TuniDbComboBox.

On the override the constructor shows the following message:

 

[DCC Hint] UniDBLookUpSesamo.pas(24): H2365 Override method TUniDBLookUpSesamo.create should match case of ancestor TUniCustomComboBox.Create

 

I attach a piece of code:

type
 TUniDBLookUpSesamo = class(TUniDBComboBox)
 private
   FeditAjaxPartenza: TUniEdit;
   FeditAjaxFine: TUniEdit;
   FuniHiddenPanel1: TUniHiddenPanel;
   procedure SeteditAjaxPartenza(const Value: TUniEdit);
   procedure SeteditAjaxFine(const Value: TUniEdit);
   procedure SetuniHiddenPanel1(const Value: TUniHiddenPanel);
   { Private declarations }
 protected
   { Protected declarations }
 public
   { Public declarations }
   constructor create(Aowner :TComponent);override;
 published
   { Published declarations }
   property editAjaxPartenza : TUniEdit read FeditAjaxPartenza write SeteditAjaxPartenza;
   property editAjaxFine : TUniEdit read FeditAjaxFine write SeteditAjaxFine;
   property uniHiddenPanel1 : TUniHiddenPanel read FuniHiddenPanel1 write SetuniHiddenPanel1;
 end;
...

constructor TUniDBLookUpSesamo.create(Aowner: TComponent);
var mioAjax, mioInizio,miaFine: string;
begin
 inherited;
...
ClientEvents.UniEvents.add(

                 'OnAfterCreate=function OnAfterCreate(sender)'#13#10'{'#13#10'      sender.ty' +
                 'peAhead = false;'#13#10'      sender.forceSelection = false;'#13#10'      se' +
                 'nder.triggerAction = '#39'all'#39';'#13#10'      sender.editable = true;'#13#10'    ' +
                 '  sender.maxHeight = 100;'#13#10'      sender.resizable = true;'#13#10'     ' +
                 ' sender.queryDelay = 500;'#13#10'      sender.minChars = 2;'#13#10'      sen' +
                 'der.disableKeyFilter = true;'#13#10'      sender.selectOnFocus = true;' +
                 #13#10'      sender.lazyRender = true;'#13#10'      validationDelay = 500;'#13 +
                 #10'}'+
...

 

Thanks and best regards

 

 

Hi..

 

Its just a warning, if it bothers you change :

 

constructor create(Aowner :TComponent);override;

 

to :

 

constructor Create(Aowner :TComponent);override; (Capital on Create)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...