Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/paste toolbar item from form-a to form-b #6

Open
hpw4711 opened this issue Oct 21, 2015 · 0 comments
Open

Copy/paste toolbar item from form-a to form-b #6

hpw4711 opened this issue Oct 21, 2015 · 0 comments

Comments

@hpw4711
Copy link

hpw4711 commented Oct 21, 2015

The copy of a toolbar-item from form-a and paste on form-b toolbar will fail (reader error):

  1. if the toolbar item has already an OnClick assigend.
  2. without any On-Properties there is no such issue!

Fix:

  1. The DsgnItemEditor needs your own DesignWindows.pas

  2. In the TDesignWindow add private error handler:

    procedure ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);

  3. Handler proc:

procedure TDesignWindow.ReaderErrorHandler (Reader: TReader; const Message: string; var Handled: Boolean);

Begin
ShowMessage ('Reader Error on component and property: >>' + Message + '<<');
Handled := True;
End;

  1. on procedure TDesignWindow.PasteComponents

add the OnError

try
  R.OnError   := ReaderErrorHandler;
  R.OnSetName := ReaderSetName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant