From 7f347aa744725c05507b037ba450109d94aba3aa Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 2 Feb 2012 22:14:46 +0000 Subject: [PATCH] IDE: better error message git-svn-id: trunk@35106 - --- ide/lazarusidestrconsts.pas | 4 ++-- ide/main.pp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 9b1a5297dc..aa4c213aa2 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -3184,6 +3184,8 @@ resourcestring lisCodeTemplComment = 'Comment:'; lisCodeTemplATokenAlreadyExists = ' A token %s%s%s already exists! '; lisCodeTemplError = 'Error'; + lisUnableToFindTheLfmFileOfComponentClassNeededByUnit = 'Unable to find the ' + +'lfm file of component class "%s".%sNeeded by unit:%s%s'; lisUnableToOpenDesignerTheClassDoesNotDescendFromADes = 'Unable to open ' +'designer.%sThe class %s does not descend from a designable class like ' +'TForm or TDataModule.'; @@ -3191,8 +3193,6 @@ resourcestring +'with .lfm file:%sThe unit %s%suses the unit %s%swhich contains the ' +'class %s,%sbut the .lfm file contains already another class.%sThere can ' +'only be one design class per unit.%sPlease move %s to another unit.'; - lisUnableToFindTheLFMOfComponentClass = 'Unable to find the lfm file of ' - +'component class %s%s%s.'; lisUnableToLoadTheComponentClassBecauseItDependsOnIts = 'Unable to load the ' +'component class %s%s%s, because it depends on itself.'; lisCancelLoadingThisComponent = 'Cancel loading this component'; diff --git a/ide/main.pp b/ide/main.pp index 47db45ebe2..15749f6e5e 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -7535,8 +7535,9 @@ begin end; // not found => tell the user - Result:=QuestionDlg(lisCodeTemplError, Format( - lisUnableToFindTheLFMOfComponentClass, ['"', AComponentClassName, '"']), + Result:=QuestionDlg(lisCodeTemplError, + Format(lisUnableToFindTheLfmFileOfComponentClassNeededByUnit, [ + AComponentClassName, #13, #13, AnUnitInfo.Filename]), mtError, [mrCancel, lisCancelLoadingThisComponent, mrAbort, lisAbortWholeLoading, mrIgnore, lisIgnoreUseTFormAsAncestor], 0);