Error Creating Form Identifier Expected On Line 4
Forum Index -> TsiLang Components Suite View previous topic :: View next topic Author Message DadeurJoined: 04 Apr 2003Posts: 5 Posted: Tue Apr 08, 2003 3:10 pm Post subject: Sil Editor problem Hello I've modified a sil file with the editor and after I've reloaded the file with the expert, Delphi can't compile the project saying: RLINK32: Unsupported 16bit resurce in file xxxxx.dfm If I tray to open the form Delphi says: Error creating form: Identifier expected on line xxx on line xxx there is this line of code: ValuesEx = {50617373776F72640150617373776F72640101} Has the Editor corrupted my file? How can I fix the problem? Please help me Thanks a lot Back to top gaivansJoined: 29 Nov 2002Posts: 71 Posted: Wed Apr 09, 2003 6:47 am Post subject: Hello, We will fix this issue in the next version release. Please, modify the unit siComp.pas as follows: In the procedure TsiCustomLang.LoadExtendedFromFile(const FileName: Tstring; const CanRewrite: Boolean); Before the line: EI.PropertyType := TTypeKind(GetEnumValue(TypeInfo(TTypeKind), S1)); Add the line: if AnsiPos(delim, S1) <> 0 then Delete(S1, AnsiPos(delim, S1), MaxWord); // 5.2.3 After that, re-build the package and load the translations from SIL file. Back to top DadeurJoined: 04 Apr 2003Posts: 5 Posted: Wed Apr 09, 2003 7:32 am Post subject: Hi gaivans, thanks for your kind reply. This will surely fix siComp but my actual problem is to fix the corrupted files because I was in a hurry and I missed the backup of my project ... Back to top gaivansJoined: 29 Nov 2002Posts: 71 Posted: Wed Apr 09, 2003 7:49 am Post subject: Hello, This will help to restore the corrupted files: 1. Open the corrupted .dfm file in a text editor, i.e., in Notepad.exe. 2. Select File|Replace..., and replace: PropertyType = with: PropertyType = tkInteger 3. Press "Replace All". 4. Save the file. After that the .dfm file could be opened in the IDE. Back to top DadeurJoined: 04 Apr 2003Posts: 5 Posted: Wed Apr 09, 2003 8:05 am Post subject: Yeah ! it works ! I really appreciated your help gaivans. You saved my life Back to top Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 YearOldest FirstNewest First SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT Page 1 of 1 Jump to:Select a forumPublic----------------GeneralTsiLang
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How i can to make a procedure for create a form? up vote 1 down vote favorite I have this procedure : procedure TForm1.Button1Click(Sender: TObject); var a:TForm2; begin a := http://www.sicomponents.com/forum/viewtopic.php?t=46&sid=a0b3241ff31efd77d614bca1d0706f74 TForm2.Create(Self); a.Parent := ScrollBox1; a.Align := alClient; a.Show; a.SetFocus; end; And i change that above code to this, but i receive a error, Why? I must change this code to? procedure TForm1.MakeAform(aForm:Tform;Cmp:TComponent;Parent1:TWinControl;Align1:TAlign); var a:aForm; // Error Here begin a := aForm.Create(Cmp); a.Parent := Parent1; a.Align := Align1; a.Show; a.SetFocus; end; procedure TForm1.Button2Click(Sender: TObject); begin MakeAform(Tform2,Self,Panel1,alClient); end; delphi delphi-xe share|improve this question asked Jan 23 '11 at 10:03 User 2023920 Why the need for a MakeAForm procedure? http://stackoverflow.com/questions/4773253/how-i-can-to-make-a-procedure-for-create-a-form And why is it part of the TForm1 class? –johnny Jan 23 '11 at 15:33 1 You want us to guess the error message, right? My guess: Undeclared identifier: aForm –Cosmin Prund Jan 23 '11 at 16:11 Or maybe the error message is "Identifier redeclared"? –Cosmin Prund Jan 23 '11 at 16:12 @Cosmin If you look at the code it will become obvious. The error occurs when OP declares a variable of type aForm but aForm is an instance rather than a type. –David Heffernan Jan 23 '11 at 16:41 @David, that's not the point I was trying to make. This is an site for programmers. I expect an user calling our help line to say but i receive a error, but I expect an programmer to understand the importance of the error messages. Hint: If you try the user's exact code in Delphi 2010, at the marked line, you get the error message E2007 Constant or type identifier expected. If you highlight the error message in the Messages list and hit "F1" you get a help page that actually helps, and gives a good example of a similar error. –Cosmin Prund Jan 23 '11 at 17:59 | show 3 more comments 2 Answers 2 active oldest votes up vote 5 down vote Your original code passes a class (TForm2) to a procedure which receives a
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups https://msdn.microsoft.com/en-us/library/cf3kzcs0.aspx TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs http://delphimaster.net/view/5-1089284149 and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Visual Basic Reference Visual Basic Language Reference Error Messages Error Messages Identifier expected Identifier expected Identifier expected '#ElseIf' error creating must be preceded by a matching '#If' or '#ElseIf' '#Region' and '#End Region' statements are not valid within method bodies/multiline lambdas ' (2004-07-08 14:55) [0] Уважаемые Мастера, посоветуйте!!!Проблема в следующем: Создаю компонент, у которого есть свойство-класс, содержащее подсвойство-компонент:...
Type
TGridHeader = class(TPersistent)
private
fHeaders :TTreeView;
fRemarks:String;
procedure SetHeaders(value:TTreeView);
procedure SetRemarks(value:string);
protected
public
constructor create;
destructor destroy;override;
published
property Headers:TTreeView read fHeaders write SetHeaders;
property remarks:string read fremarks write SetRemarks;
end;
...
// Собственно редактор свойств :
TGridHeaderProperty = class(TClassProperty)
public
procedure Edit; override;
function GetAttributes:TPropertyAttributes;override;
end;
procedure TGridHeaderProperty.Edit;
Var
fmHDRDlg:TfmHDRDlg; // форма редактора свойств
begin
Try
fmHDRDlg:=TfmHDRDlg.Create(nil);
if fmHDRDlg.Execute(TComponent(GetComponent(0)), // МОЖЕТ ЗДЕСЬ ЧЕ НЕ ТАК ???
TGridHeader(GetOrdValue))
then SetOrdValue(Longint(TGridHeader(GetOrdValue)));
Finally
fmHDRDlg.Free;
End;
end;
...
// КОМПОНЕНТ :
TeG = class(TDBGrid)
private
fGridHeader:TGridHeader;
procedure SetGridHeader(Value:TTreeView);
protected
public
constructor Create (AOwner : TComponent); override;
destructor Destroy;override;
published
property GridHeader:TGridHeader read fGridHeader