View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003666 | JEDI VCL | 00 JVCL Components | public | 2006-04-28 08:05 | 2006-05-03 05:19 |
Reporter | ivan_ra | Assigned To | ivan_ra | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003666: JvInterpreterFm: MakeForm function does not work | ||||
Description | After introdice of Class Fields support for interpreted forms MakeForm function raises exception This is example for bug | ||||
Additional Information | And this is fix: because now JvInterpreterFm requires FForm.FClassIdentifier we must find form class in unit. Fix is very simple, more accurate fix must read form class from DFM stream | ||||
Tags | No tags attached. | ||||
2006-04-28 08:07
|
FormsExample.zip (2,766 bytes) |
2006-04-28 08:08
|
JvInterpreterFm.pas.patch (1,152 bytes)
Index: JvInterpreterFm.pas =================================================================== --- JvInterpreterFm.pas (revision 10546) +++ JvInterpreterFm.pas (working copy) @@ -356,6 +356,7 @@ var Stream: TStream; SrcClass: TJvInterpreterIdentifier; // Class Fields support + i: integer; begin FForm := AForm; Form.FJvInterpreterFm := Self; @@ -365,11 +366,19 @@ finally FreeDfmStream(Stream); end; + // find form class + for i:=0 to Adapter.SrcClassList.Count-1 do + if cmp(TJvInterpreterIdentifier(Adapter.SrcClassList[i]).UnitName,FForm.FUnitName) then + begin + FForm.FClassIdentifier := TJvInterpreterIdentifier(Adapter.SrcClassList[i]).Identifier; + Break; + end; // Class Fields support begin // copy form fields from pattern SrcClass := TJvInterpreterAdapterAccessProtected(Adapter).GetSrcClass( AForm.FClassIdentifier); - AForm.FFieldList.Assign(TJvInterpreterClass(SrcClass).ClassFields); + if assigned(SrcClass) then + AForm.FFieldList.Assign(TJvInterpreterClass(SrcClass).ClassFields); // Class Fields support end try if Assigned(Form.OnCreate) then |
|
Sorry, I forget 1 string in patch: if FForm.FClassIdentifier = '' then ... and so on |
|
Ivan, I tried to send you an email, but your email provider blocked my SMTP server IP address. I'll try again this evening from another SMTP server, in the meantime if you want to contact me via another email address, please do. Cheers Olivie |
|
this is now in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-04-28 08:05 | ivan_ra | New Issue | |
2006-04-28 08:07 | ivan_ra | File Added: FormsExample.zip | |
2006-04-28 08:08 | ivan_ra | File Added: JvInterpreterFm.pas.patch | |
2006-04-28 20:59 | ivan_ra | Note Added: 0009199 | |
2006-05-02 01:38 | obones | Note Added: 0009224 | |
2006-05-02 01:38 | obones | Status | new => feedback |
2006-05-03 05:16 | ivan_ra | Note Added: 0009246 | |
2006-05-03 05:17 | ivan_ra | Status | feedback => closed |
2006-05-03 05:19 | ivan_ra | Status | closed => resolved |
2006-05-03 05:19 | ivan_ra | Resolution | open => fixed |
2006-05-03 05:19 | ivan_ra | Assigned To | => ivan_ra |